File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -957,14 +957,14 @@ impl Stmt {
957
957
_ => error ! ( "unknown" ) ,
958
958
} ) ;
959
959
960
- return vec ! [ Self :: StructDecl {
960
+ vec ! [ Self :: StructDecl {
961
961
id,
962
962
encoding_name,
963
963
availability,
964
964
boxable,
965
965
fields,
966
966
sendable,
967
- } ] ;
967
+ } ]
968
968
}
969
969
EntityKind :: EnumDecl => {
970
970
// Enum declarations show up twice for some reason, but
@@ -1373,8 +1373,9 @@ impl fmt::Display for Stmt {
1373
1373
} ;
1374
1374
1375
1375
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" ) ;
1378
1379
1379
1380
writeln ! ( f, "{macro_name}!(" ) ?;
1380
1381
writeln ! ( f, " {derives}" ) ?;
Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ fn get_argument_tokens<'a>(entity: &Entity<'a>) -> Vec<Token<'a>> {
240
240
// Remove the macro name from the full macro tokens
241
241
let name_ranges = entity. get_name_ranges ( ) ;
242
242
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 ( ) ;
244
244
let range = entity. get_range ( ) . expect ( "macro range" ) ;
245
245
246
246
let mut tokens = SourceRange :: new ( name_range. get_end ( ) , range. get_end ( ) ) . tokenize ( ) ;
Original file line number Diff line number Diff line change 12
12
//! ```
13
13
#![ doc = include_str ! ( "../../examples/introspection.rs" ) ]
14
14
//! ```
15
+ #![ allow( clippy:: missing_panics_doc) ]
15
16
16
17
#[ cfg( feature = "malloc" ) ]
17
18
use alloc:: vec:: Vec ;
You can’t perform that action at this time.
0 commit comments