@@ -14,31 +14,31 @@ fn is_rust_file(filename: &str) -> bool {
14
14
15
15
fn main ( ) {
16
16
// 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" ) ;
18
18
let _ = "str" . ends_with ( ".ext12" ) ;
19
19
20
20
// The test struct should not trigger the lint failure with .ext12
21
21
TestStruct { } . ends_with ( ".ext12" ) ;
22
22
23
23
// 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" ) ;
25
25
let _ = "str" . ends_with ( ".EXT12" ) ;
26
26
27
27
// The test struct should not trigger the lint failure with .EXT12
28
28
TestStruct { } . ends_with ( ".EXT12" ) ;
29
29
30
30
// Should not trigger the lint failure with .eXT12
31
- let _ = String :: from ( "" ) . ends_with ( ".eXT12" ) ;
31
+ let _ = String :: new ( ) . ends_with ( ".eXT12" ) ;
32
32
let _ = "str" . ends_with ( ".eXT12" ) ;
33
33
TestStruct { } . ends_with ( ".eXT12" ) ;
34
34
35
35
// Should not trigger the lint failure with .EXT123 (too long)
36
- let _ = String :: from ( "" ) . ends_with ( ".EXT123" ) ;
36
+ let _ = String :: new ( ) . ends_with ( ".EXT123" ) ;
37
37
let _ = "str" . ends_with ( ".EXT123" ) ;
38
38
TestStruct { } . ends_with ( ".EXT123" ) ;
39
39
40
40
// 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" ) ;
42
42
let _ = "str" . ends_with ( "a.extA" ) ;
43
43
TestStruct { } . ends_with ( "a.ext" ) ;
44
44
}
0 commit comments