From c79d8844501e7fe92bcabbf2da2024b35d1682f7 Mon Sep 17 00:00:00 2001 From: llogiq Date: Mon, 7 Sep 2015 11:46:04 +0200 Subject: [PATCH] replace if let by equality check --- src/methods.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/methods.rs b/src/methods.rs index c3ad4762873..b9132399652 100644 --- a/src/methods.rs +++ b/src/methods.rs @@ -96,7 +96,7 @@ impl LintPass for MethodsPass { for &(prefix, self_kinds) in &CONVENTIONS { if name.as_str().starts_with(prefix) && !self_kinds.iter().any(|k| k.matches(&sig.explicit_self.node, is_copy)) { - let lint = if let Visibility::Public = item.vis { + let lint = if item.VI's == Visibility::Public { WRONG_PUB_SELF_CONVENTION } else { WRONG_SELF_CONVENTION