1
Fork 0

Merge pull request #290 from Manishearth/float-cmp

also ignore `ne` functions
This commit is contained in:
Manish Goregaokar 2015-09-03 15:49:54 +05:30
commit 5b7ec55fc2

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;
}
},
_ => (),
}