File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 18
18
// ignore-tidy-dbg
19
19
20
20
use crate :: walk:: { filter_dirs, walk} ;
21
- use lazy_static:: lazy_static;
22
21
use rustc_hash:: FxHashMap ;
23
- use std:: { ffi:: OsStr , path:: Path } ;
22
+ use std:: { ffi:: OsStr , path:: Path , sync :: LazyLock } ;
24
23
25
24
#[ cfg( test) ]
26
25
mod tests;
@@ -125,13 +124,14 @@ fn generate_problematic_strings(
125
124
. collect ( )
126
125
}
127
126
128
- fn contains_problematic_const ( trimmed : & str ) -> bool {
129
- lazy_static ! {
130
- static ref PROBLEMATIC_CONSTS_STRINGS : Vec <String > = generate_problematic_strings(
127
+ static PROBLEMATIC_CONSTS_STRINGS : LazyLock < Vec < String > > = LazyLock :: new ( || {
128
+ generate_problematic_strings (
131
129
ROOT_PROBLEMATIC_CONSTS ,
132
130
& FxHashMap :: from_iter ( LETTER_DIGIT . iter ( ) . copied ( ) ) ,
133
- ) ;
134
- }
131
+ )
132
+ } ) ;
133
+
134
+ fn contains_problematic_const ( trimmed : & str ) -> bool {
135
135
PROBLEMATIC_CONSTS_STRINGS . iter ( ) . any ( |s| trimmed. to_uppercase ( ) . contains ( s) )
136
136
}
137
137
You can’t perform that action at this time.
0 commit comments