Skip to content

Commit 7db1ea9

Browse files
committed
Ignore needless_late_init Clippy lint
error: unneeded late initalization --> tests/../src/lexical/float.rs:173:9 | 173 | let exp: u64; | ^^^^^^^^^^^^^ | = note: `-D clippy::needless-late-init` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init help: declare `exp` here | 174 | let exp: u64 = if (fp.exp == F::DENORMAL_EXPONENT) && (fp.mant & F::HIDDEN_BIT_MASK.as_u64()) == 0 { | ++++++++++++++ help: remove the assignments from the branches | 175 ~ 0 176 | } else { 177 ~ (fp.exp + F::EXPONENT_BIAS) as u64 | help: add a semicolon after the `if` expression | 178 | }; | +
1 parent fc0ca07 commit 7db1ea9

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/lib.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@
312312
clippy::match_like_matches_macro,
313313
clippy::match_single_binding,
314314
clippy::needless_doctest_main,
315+
clippy::needless_late_init,
315316
clippy::transmute_ptr_to_ptr,
316317
clippy::unnecessary_wraps,
317318
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/5704

‎tests/lexical.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
clippy::float_cmp,
1111
clippy::if_not_else,
1212
clippy::module_name_repetitions,
13+
clippy::needless_late_init,
1314
clippy::shadow_unrelated,
1415
clippy::similar_names,
1516
clippy::single_match_else,

0 commit comments

Comments
 (0)