File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -143,9 +143,9 @@ impl Bindings {
143
143
std:: fs:: create_dir_all ( dir) . unwrap ( ) ;
144
144
}
145
145
let mut writer = BufWriter :: new ( File :: create ( symfile_path) . unwrap ( ) ) ;
146
- write ! ( & mut writer, "{{\n " ) . expect ( "writing symbol file header failed" ) ;
146
+ writeln ! ( & mut writer, "{{" ) . expect ( "writing symbol file header failed" ) ;
147
147
for symbol in self . dynamic_symbols_names ( ) {
148
- write ! ( & mut writer, "{};\n " , symbol) . expect ( "writing symbol failed" ) ;
148
+ writeln ! ( & mut writer, "{};" , symbol) . expect ( "writing symbol failed" ) ;
149
149
}
150
150
write ! ( & mut writer, "}};" ) . expect ( "writing symbol file footer failed" ) ;
151
151
}
Original file line number Diff line number Diff line change @@ -236,8 +236,7 @@ impl CDecl {
236
236
237
237
#[ allow( clippy:: while_let_on_iterator) ]
238
238
while let Some ( declarator) = iter_rev. next ( ) {
239
- let next_is_pointer = iter_rev. peek ( ) . map_or ( false , |x| x. is_ptr ( ) ) ;
240
-
239
+ let next_is_pointer = iter_rev. peek ( ) . is_some_and ( |x| x. is_ptr ( ) ) ;
241
240
match * declarator {
242
241
CDeclarator :: Ptr {
243
242
is_const,
Original file line number Diff line number Diff line change @@ -645,7 +645,7 @@ impl Constant {
645
645
return ;
646
646
}
647
647
648
- let associated_to_transparent = associated_to_struct. map_or ( false , |s| s. is_transparent ) ;
648
+ let associated_to_transparent = associated_to_struct. is_some_and ( |s| s. is_transparent ) ;
649
649
650
650
let in_body = associated_to_struct. is_some ( )
651
651
&& config. language == Language :: Cxx
You can’t perform that action at this time.
0 commit comments