This commit is contained in:
Oliver Scherer
2019-05-18 01:34:52 +02:00
parent 462df72100
commit f49ef0ec04
6 changed files with 73 additions and 75 deletions

View File

@@ -72,7 +72,7 @@ fn check_lit(cx: &LateContext<'_, '_>, lit: &LitKind, e: &Expr) {
fn check_known_consts(cx: &LateContext<'_, '_>, e: &Expr, s: symbol::Symbol, module: &str) {
let s = s.as_str();
if s.parse::<f64>().is_ok() {
for &(constant, name, min_digits) in KNOWN_CONSTS.iter() {
for &(constant, name, min_digits) in &KNOWN_CONSTS {
if is_approx_const(constant, &s, min_digits) {
span_lint(
cx,