@@ -14,31 +14,31 @@ fn is_rust_file(filename: &str) -> bool {
1414
1515fn main ( ) {
1616 // std::string::String and &str should trigger the lint failure with .ext12
17- let _ = String :: from ( "" ) . ends_with ( ".ext12" ) ;
17+ let _ = String :: new ( ) . ends_with ( ".ext12" ) ;
1818 let _ = "str" . ends_with ( ".ext12" ) ;
1919
2020 // The test struct should not trigger the lint failure with .ext12
2121 TestStruct { } . ends_with ( ".ext12" ) ;
2222
2323 // std::string::String and &str should trigger the lint failure with .EXT12
24- let _ = String :: from ( "" ) . ends_with ( ".EXT12" ) ;
24+ let _ = String :: new ( ) . ends_with ( ".EXT12" ) ;
2525 let _ = "str" . ends_with ( ".EXT12" ) ;
2626
2727 // The test struct should not trigger the lint failure with .EXT12
2828 TestStruct { } . ends_with ( ".EXT12" ) ;
2929
3030 // Should not trigger the lint failure with .eXT12
31- let _ = String :: from ( "" ) . ends_with ( ".eXT12" ) ;
31+ let _ = String :: new ( ) . ends_with ( ".eXT12" ) ;
3232 let _ = "str" . ends_with ( ".eXT12" ) ;
3333 TestStruct { } . ends_with ( ".eXT12" ) ;
3434
3535 // Should not trigger the lint failure with .EXT123 (too long)
36- let _ = String :: from ( "" ) . ends_with ( ".EXT123" ) ;
36+ let _ = String :: new ( ) . ends_with ( ".EXT123" ) ;
3737 let _ = "str" . ends_with ( ".EXT123" ) ;
3838 TestStruct { } . ends_with ( ".EXT123" ) ;
3939
4040 // Shouldn't fail if it doesn't start with a dot
41- let _ = String :: from ( "" ) . ends_with ( "a.ext" ) ;
41+ let _ = String :: new ( ) . ends_with ( "a.ext" ) ;
4242 let _ = "str" . ends_with ( "a.extA" ) ;
4343 TestStruct { } . ends_with ( "a.ext" ) ;
4444}
0 commit comments