From ba5067a6f04c0dbd5139cd876758fb2a11fad7cd Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Fri, 30 Dec 2022 11:28:06 +0000 Subject: [PATCH 1/2] suppress 'clippy::approx_constant' lint in test case --- crates/syntax/src/ast/token_ext.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/syntax/src/ast/token_ext.rs b/crates/syntax/src/ast/token_ext.rs index ca18196300..4ad7cf33cd 100644 --- a/crates/syntax/src/ast/token_ext.rs +++ b/crates/syntax/src/ast/token_ext.rs @@ -481,6 +481,7 @@ bcde", b"abcde", #[test] fn test_value_underscores() { + #[allow(clippy::approx_constant)] check_float_value("3.141592653589793_f64", 3.141592653589793_f64); check_float_value("1__0.__0__f32", 10.0); check_int_value("0b__1_0_", 2); From b196e5b2f6b211420bb874d1e4c44e58468ff5ed Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sat, 31 Dec 2022 09:26:58 +0000 Subject: [PATCH 2/2] fixup --- crates/syntax/src/ast/token_ext.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/syntax/src/ast/token_ext.rs b/crates/syntax/src/ast/token_ext.rs index 4ad7cf33cd..2cd312e7f4 100644 --- a/crates/syntax/src/ast/token_ext.rs +++ b/crates/syntax/src/ast/token_ext.rs @@ -481,8 +481,7 @@ bcde", b"abcde", #[test] fn test_value_underscores() { - #[allow(clippy::approx_constant)] - check_float_value("3.141592653589793_f64", 3.141592653589793_f64); + check_float_value("1.234567891011121_f64", 1.234567891011121_f64); check_float_value("1__0.__0__f32", 10.0); check_int_value("0b__1_0_", 2); check_int_value("1_1_1_1_1_1", 111111);