Fix header

This commit is contained in:
blyxyas
2023-05-08 18:38:41 +02:00
parent ba0e7e88cb
commit 4c3e2ff2a4
2 changed files with 2 additions and 10 deletions
+1 -9
View File
@@ -102,7 +102,6 @@
pub struct WildcardImports {
warn_on_all: bool,
test_modules_deep: u32,
ignore: bool,
}
impl WildcardImports {
@@ -110,7 +109,6 @@ pub fn new(warn_on_all: bool) -> Self {
Self {
warn_on_all,
test_modules_deep: 0,
ignore: false,
}
}
}
@@ -118,14 +116,8 @@ pub fn new(warn_on_all: bool) -> Self {
impl_lint_pass!(WildcardImports => [ENUM_GLOB_USE, WILDCARD_IMPORTS]);
impl LateLintPass<'_> for WildcardImports {
fn check_crate(&mut self, cx: &LateContext<'_>) {
if cx.sess().opts.test {
self.ignore = true;
}
}
fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) {
if self.ignore {
if cx.sess().is_test_crate() {
return;
}
+1 -1
View File
@@ -1,4 +1,4 @@
// compile-flags: --test
//@compile-flags: --test
#![warn(clippy::wildcard_imports)]
#![allow(unused, clippy::unnecessary_wraps, clippy::let_unit_value)]