File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -158,12 +158,14 @@ impl LateLintPass<'_, '_> for WildcardImports {
158158// Allow "...prelude::*" imports.
159159// Many crates have a prelude, and it is imported as a glob by design.
160160fn is_prelude_import ( segments : & [ PathSegment < ' _ > ] ) -> bool {
161- segments. iter ( ) . last ( ) . map_or ( false , |ps| ps. ident . as_str ( ) == "prelude" )
161+ segments
162+ . iter ( )
163+ . last ( )
164+ . map_or ( false , |ps| ps. ident . as_str ( ) == "prelude" )
162165}
163166
164167// Allow "super::*" imports.
165168// This is intended primarily to ease the process of writing unit tests.
166169fn is_super_only_import_in_test ( segments : & [ PathSegment < ' _ > ] ) -> bool {
167- segments. iter ( ) . len ( ) == 1 &&
168- segments. first ( ) . map_or ( false , |ps| ps. ident . as_str ( ) == "super" )
170+ segments. iter ( ) . len ( ) == 1 && segments. first ( ) . map_or ( false , |ps| ps. ident . as_str ( ) == "super" )
169171}
You can’t perform that action at this time.
0 commit comments