less false positives for approx_const and float_cmp
This commit is contained in:
parent
aefad45ee7
commit
681bce925f
2 changed files with 10 additions and 2 deletions
|
|
@ -93,7 +93,7 @@ impl LintPass for FloatCmp {
|
|||
return;
|
||||
}
|
||||
if let Some(name) = get_item_name(cx, expr) {
|
||||
if name == "eq" || name == "ne" ||
|
||||
if name == "eq" || name == "ne" || name == "is_nan" ||
|
||||
name.as_str().starts_with("eq_") ||
|
||||
name.as_str().ends_with("_eq") {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue