@@ -101,15 +101,15 @@ declare_clippy_lint! {
101101pub struct WildcardImports {
102102 warn_on_all : bool ,
103103 test_modules_deep : u32 ,
104- ignored_segments : FxHashSet < String > ,
104+ allowed_segments : FxHashSet < String > ,
105105}
106106
107107impl WildcardImports {
108- pub fn new ( warn_on_all : bool , ignored_wildcard_imports : FxHashSet < String > ) -> Self {
108+ pub fn new ( warn_on_all : bool , allowed_wildcard_imports : FxHashSet < String > ) -> Self {
109109 Self {
110110 warn_on_all,
111111 test_modules_deep : 0 ,
112- ignored_segments : ignored_wildcard_imports ,
112+ allowed_segments : allowed_wildcard_imports ,
113113 }
114114 }
115115}
@@ -193,7 +193,7 @@ impl WildcardImports {
193193 item. span . from_expansion ( )
194194 || is_prelude_import ( segments)
195195 || ( is_super_only_import ( segments) && self . test_modules_deep > 0 )
196- || is_ignored_via_config ( segments, & self . ignored_segments )
196+ || is_allowed_via_config ( segments, & self . allowed_segments )
197197 }
198198}
199199
@@ -211,9 +211,9 @@ fn is_super_only_import(segments: &[PathSegment<'_>]) -> bool {
211211}
212212
213213// Allow skipping imports containing user configured segments,
214- // i.e. "...::utils::...::*" if user put `ignored -wildcard-imports = ["utils"]` in `Clippy.toml`
215- fn is_ignored_via_config ( segments : & [ PathSegment < ' _ > ] , ignored_segments : & FxHashSet < String > ) -> bool {
214+ // i.e. "...::utils::...::*" if user put `allowed -wildcard-imports = ["utils"]` in `Clippy.toml`
215+ fn is_allowed_via_config ( segments : & [ PathSegment < ' _ > ] , allowed_segments : & FxHashSet < String > ) -> bool {
216216 // segment matching need to be exact instead of using 'contains', in case user unintentionaly put
217217 // a single character in the config thus skipping most of the warnings.
218- segments. iter ( ) . any ( |seg| ignored_segments . contains ( seg. ident . as_str ( ) ) )
218+ segments. iter ( ) . any ( |seg| allowed_segments . contains ( seg. ident . as_str ( ) ) )
219219}
0 commit comments