Merge pull request #290 from Manishearth/float-cmp
also ignore `ne` functions
This commit is contained in:
commit
5b7ec55fc2
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
},
|
||||
_ => (),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue