Skip to content

Commit 19c17af

Browse files
committed
Appease clippy
1 parent 34a148c commit 19c17af

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

crates/header-translator/src/stmt.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -957,14 +957,14 @@ impl Stmt {
957957
_ => error!("unknown"),
958958
});
959959

960-
return vec![Self::StructDecl {
960+
vec![Self::StructDecl {
961961
id,
962962
encoding_name,
963963
availability,
964964
boxable,
965965
fields,
966966
sendable,
967-
}];
967+
}]
968968
}
969969
EntityKind::EnumDecl => {
970970
// Enum declarations show up twice for some reason, but
@@ -1373,8 +1373,9 @@ impl fmt::Display for Stmt {
13731373
};
13741374

13751375
let (superclass, superclasses_rest) = superclasses.split_at(1);
1376-
let (superclass, superclass_generics) =
1377-
superclass.get(0).expect("must have a least one superclass");
1376+
let (superclass, superclass_generics) = superclass
1377+
.first()
1378+
.expect("must have a least one superclass");
13781379

13791380
writeln!(f, "{macro_name}!(")?;
13801381
writeln!(f, " {derives}")?;

crates/header-translator/src/unexposed_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ fn get_argument_tokens<'a>(entity: &Entity<'a>) -> Vec<Token<'a>> {
240240
// Remove the macro name from the full macro tokens
241241
let name_ranges = entity.get_name_ranges();
242242
assert_eq!(name_ranges.len(), 1, "macro name ranges");
243-
let name_range = name_ranges.get(0).unwrap();
243+
let name_range = name_ranges.first().unwrap();
244244
let range = entity.get_range().expect("macro range");
245245

246246
let mut tokens = SourceRange::new(name_range.get_end(), range.get_end()).tokenize();

crates/objc2/src/runtime/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//! ```
1313
#![doc = include_str!("../../examples/introspection.rs")]
1414
//! ```
15+
#![allow(clippy::missing_panics_doc)]
1516

1617
#[cfg(feature = "malloc")]
1718
use alloc::vec::Vec;

0 commit comments

Comments
 (0)