From 05a6643b1ae5f70092fce148c1bb493142219434 Mon Sep 17 00:00:00 2001 From: Adrian Stanciu Date: Mon, 24 Aug 2020 09:10:55 +0300 Subject: [PATCH] Remove warnings `unused_parens` is now on by default: ``` warning: unnecessary parentheses around const expression --> src\lib.rs:777:35 | 777 | let mut coeff_array: [u8; (BME680_COEFF_ADDR1_LEN + BME680_COEFF_ADDR2_LEN)] = | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses | = note: `#[warn(unused_parens)]` on by default warning: unnecessary parentheses around const expression --> src\lib.rs:778:17 | 778 | [0; (BME680_COEFF_ADDR1_LEN + BME680_COEFF_ADDR2_LEN)]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses warning: 2 warnings emitted ``` --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 9a216c5..ef466f6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -774,8 +774,8 @@ where { let mut calib: CalibData = Default::default(); - let mut coeff_array: [u8; (BME680_COEFF_ADDR1_LEN + BME680_COEFF_ADDR2_LEN)] = - [0; (BME680_COEFF_ADDR1_LEN + BME680_COEFF_ADDR2_LEN)]; + let mut coeff_array: [u8; BME680_COEFF_ADDR1_LEN + BME680_COEFF_ADDR2_LEN] = + [0; BME680_COEFF_ADDR1_LEN + BME680_COEFF_ADDR2_LEN]; I2CUtil::read_bytes::( i2c,