File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ fn should_overwrite_expected() -> bool {
27
27
return true ;
28
28
}
29
29
assert ! (
30
- var == "0" || var == "" ,
30
+ var == "0" || var. is_empty ( ) ,
31
31
"Invalid value of BINDGEN_OVERWRITE_EXPECTED"
32
32
) ;
33
33
}
@@ -57,7 +57,7 @@ fn error_diff_mismatch(
57
57
if let Some ( var) = env:: var_os ( "BINDGEN_TESTS_DIFFTOOL" ) {
58
58
//usecase: var = "meld" -> You can hand check differences
59
59
let Some ( std:: path:: Component :: Normal ( name) ) =
60
- filename. components ( ) . last ( )
60
+ filename. components ( ) . next_back ( )
61
61
else {
62
62
panic ! ( "Why is the header variable so weird?" )
63
63
} ;
@@ -187,7 +187,7 @@ fn compare_generated_header(
187
187
header. display( ) ,
188
188
looked_at,
189
189
) ,
190
- } ;
190
+ }
191
191
192
192
let ( builder, roundtrip_builder) = builder. into_builder ( check_roundtrip) ?;
193
193
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ fn format_attribute_tokens(attrs: &[TokenStream]) -> Vec<String> {
272
272
comments. push ( format ! (
273
273
"{}{}" ,
274
274
if block_comment_count > 0 { " " } else { "" } ,
275
- cleaned. to_string ( )
275
+ cleaned
276
276
) ) ;
277
277
} else if trimmed. starts_with ( '#' ) {
278
278
attrs. push ( line. into ( ) ) ;
You can’t perform that action at this time.
0 commit comments