This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress blocks_in_if_conditions clippy lint
This code is fine. Clippy's suggestion is not better. error: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let` --> src/de.rs:990:5 | 990 | / if { 991 | | let v = v.trim_start_matches(&['-', '+'][..]); 992 | | v.len() > 1 && v.starts_with('0') && v.bytes().all(|b| b.is_ascii_digit()) 993 | | } { | |_____^ | = note: `-D clippy::blocks-in-if-conditions` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions help: try | 990 ~ let res = { 991 + let v = v.trim_start_matches(&['-', '+'][..]); 992 + v.len() > 1 && v.starts_with('0') && v.bytes().all(|b| b.is_ascii_digit()) 993 ~ }; if res { |
- Loading branch information