also ignore functions

This commit is contained in:
llogiq 2015-09-03 10:57:11 +02:00
parent 2c3dd4a200
commit cb571bf2e2

View File

@ -98,8 +98,11 @@ impl LintPass for FloatCmp {
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;
}
},
_ => (),
}