]> git.lizzy.rs Git - rust.git/commitdiff
also ignore functions
authorllogiq <bogusandre@gmail.com>
Thu, 3 Sep 2015 08:57:11 +0000 (10:57 +0200)
committerllogiq <bogusandre@gmail.com>
Thu, 3 Sep 2015 08:57:11 +0000 (10:57 +0200)
src/misc.rs

index 5f32a93d3dd25bbfe5a9fac12a4cf467b147be01..1376bf41b3843da3e6437a1e57763112c0519040 100644 (file)
@@ -98,8 +98,11 @@ fn check_expr(&mut self, cx: &Context, expr: &Expr) {
                     Some(NodeTraitItem(&TraitItem{ id: _, ref ident, .. })) |
                     Some(NodeImplItem(&ImplItem{ id: _, ref ident, .. })) => {
                         let name = ident.name.as_str();
-                        if &*name == "eq" || name.starts_with("eq_") ||
-                                name.ends_with("_eq") { return; }
+                        if &*name == "eq" || &*name == "ne" ||
+                                name.starts_with("eq_") ||
+                                name.ends_with("_eq") {
+                            return;
+                        }
                     },
                     _ => (),
                 }