[INFO] fetching crate schubfach 0.0.1... [INFO] linting schubfach-0.0.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate schubfach 0.0.1 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate schubfach 0.0.1 [INFO] finished tweaking crates.io crate schubfach 0.0.1 [INFO] tweaked toml for crates.io crate schubfach 0.0.1 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate schubfach 0.0.1 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 10 packages to latest compatible versions [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded ilog v1.0.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 17a511756464029fb8d91b0037518ed18fd9d9dd85da81ef37b6e7e9d2bc7824 [INFO] running `Command { std: "docker" "start" "-a" "17a511756464029fb8d91b0037518ed18fd9d9dd85da81ef37b6e7e9d2bc7824", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "17a511756464029fb8d91b0037518ed18fd9d9dd85da81ef37b6e7e9d2bc7824", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "17a511756464029fb8d91b0037518ed18fd9d9dd85da81ef37b6e7e9d2bc7824", kill_on_drop: false }` [INFO] [stdout] 17a511756464029fb8d91b0037518ed18fd9d9dd85da81ef37b6e7e9d2bc7824 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 74b187e0559ddc9dae833be4f5194a00731fb9a66e2a5829f70d59f360f8a764 [INFO] running `Command { std: "docker" "start" "-a" "74b187e0559ddc9dae833be4f5194a00731fb9a66e2a5829f70d59f360f8a764", kill_on_drop: false }` [INFO] [stderr] Checking ilog v1.0.2 [INFO] [stderr] Checking oorandom v11.1.5 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking schubfach v0.0.1 (/opt/rustwide/workdir) [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> src/lib.rs:375:39 [INFO] [stdout] | [INFO] [stdout] 375 | const DIGITS100: &[u8; 200] = &[ [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 376 | | b'0', b'0', b'0', b'1', b'0', b'2', b'0', b'3', b'0', b'4', b'0', b'5', b'0', b'6', b'0', b'7', b'0', b'8', b'0', b'9', [INFO] [stdout] 377 | | b'1', b'0', b'1', b'1', b'1', b'2', b'1', b'3', b'1', b'4', b'1', b'5', b'1', b'6', b'1', b'7', b'1', b'8', b'1', b'9', [INFO] [stdout] 378 | | b'2', b'0', b'2', b'1', b'2', b'2', b'2', b'3', b'2', b'4', b'2', b'5', b'2', b'6', b'2', b'7', b'2', b'8', b'2', b'9', [INFO] [stdout] ... | [INFO] [stdout] 385 | | b'9', b'0', b'9', b'1', b'9', b'2', b'9', b'3', b'9', b'4', b'9', b'5', b'9', b'6', b'9', b'7', b'9', b'8', b'9', b'9', [INFO] [stdout] 386 | | ]; [INFO] [stdout] | |_________^ help: try: `b"00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/maths.rs:16:19 [INFO] [stdout] | [INFO] [stdout] 16 | debug_assert!(-1233 <= x && x <= 1233); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1233..=1233).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/maths.rs:662:19 [INFO] [stdout] | [INFO] [stdout] 662 | debug_assert!(K_MIN <= x && x <= K_MAX); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(K_MIN..=K_MAX).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/maths.rs:678:5 [INFO] [stdout] | [INFO] [stdout] 678 | return (value & ((1_u64 << e2) - 1)) == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 678 - return (value & ((1_u64 << e2) - 1)) == 0; [INFO] [stdout] 678 + (value & ((1_u64 << e2) - 1)) == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/maths.rs:677:19 [INFO] [stdout] | [INFO] [stdout] 677 | debug_assert!(0 <= e2 && e2 <= 64); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `(0..=64).contains(&e2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:206:23 [INFO] [stdout] | [INFO] [stdout] 206 | debug_assert!(-1500 <= q && q <= 1500); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1500..=1500).contains(&q)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:209:23 [INFO] [stdout] | [INFO] [stdout] 209 | debug_assert!(1 <= h && h <= 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `(1..=4).contains(&h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NumFmtBuffer` [INFO] [stdout] --> src/lib.rs:356:5 [INFO] [stdout] | [INFO] [stdout] 356 | / pub fn new() -> Self { [INFO] [stdout] 357 | | let size = Self::BUFFER_LEN; [INFO] [stdout] 358 | | let layout = Layout::array::(size).expect("cannot create layout"); [INFO] [stdout] 359 | | let buffer = unsafe { alloc::alloc(layout) }; [INFO] [stdout] ... | [INFO] [stdout] 363 | | NumFmtBuffer { buffer, ptr: buffer, size, options: FmtOptions::default() } [INFO] [stdout] 364 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 353 + impl Default for NumFmtBuffer { [INFO] [stdout] 354 + fn default() -> Self { [INFO] [stdout] 355 + Self::new() [INFO] [stdout] 356 + } [INFO] [stdout] 357 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:422:23 [INFO] [stdout] | [INFO] [stdout] 422 | debug_assert!(1 <= value && value <= 99999999); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=99999999).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/lib.rs:430:28 [INFO] [stdout] | [INFO] [stdout] 430 | self.write_2digits(offset + 0, qh); [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/lib.rs:482:36 [INFO] [stdout] | [INFO] [stdout] 482 | self.write_2digits(offset + 0, rh); [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:523:23 [INFO] [stdout] | [INFO] [stdout] 523 | debug_assert!(1 <= output && output <= 99, "output: {output}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=99).contains(&output)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:534:27 [INFO] [stdout] | [INFO] [stdout] 534 | debug_assert!(1 <= q && q <= 9); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `(1..=9).contains(&q)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:570:16 [INFO] [stdout] | [INFO] [stdout] 570 | if !tie || (tie && *ptr & 1 != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 570 - if !tie || (tie && *ptr & 1 != 0) { [INFO] [stdout] 570 + if !(tie && *ptr & 1 == 0) { [INFO] [stdout] | [INFO] [stdout] 570 - if !tie || (tie && *ptr & 1 != 0) { [INFO] [stdout] 570 + if !tie || *ptr & 1 != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/lib.rs:606:5 [INFO] [stdout] | [INFO] [stdout] 606 | unsafe fn simple_format(&mut self, decoded: Decoded) -> usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] = note: `#[warn(clippy::missing_safety_doc)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/lib.rs:671:26 [INFO] [stdout] | [INFO] [stdout] 671 | max(24, 20 + Self::MIN_FIXED_DECIMAL_POINT.abs() as usize), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `Self::MIN_FIXED_DECIMAL_POINT.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:688:25 [INFO] [stdout] | [INFO] [stdout] 688 | let use_fixed = Self::MIN_FIXED_DECIMAL_POINT <= decimal_point && decimal_point <= Self::MAX_FIXED_DECIMAL_POINT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(Self::MIN_FIXED_DECIMAL_POINT..=Self::MAX_FIXED_DECIMAL_POINT).contains(&decimal_point)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/lib.rs:761:21 [INFO] [stdout] | [INFO] [stdout] 761 | let k = scientific_exponent.abs() as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `scientific_exponent.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/lib.rs:782:26 [INFO] [stdout] | [INFO] [stdout] 782 | max(24, 20 + Self::MIN_FIXED_DECIMAL_POINT.abs() as usize), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `Self::MIN_FIXED_DECIMAL_POINT.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/lib.rs:803:25 [INFO] [stdout] | [INFO] [stdout] 803 | let width = self.options.width [INFO] [stdout] | _________________________^ [INFO] [stdout] 804 | | .and_then(|width| Some(min(width - decimal.sign as u32, self.size as u32))); [INFO] [stdout] | |___________________________________________________________________________________________^ help: try: `self.options.width.map(|width| min(width - decimal.sign as u32, self.size as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/lib.rs:805:33 [INFO] [stdout] | [INFO] [stdout] 805 | let mut precision = self.options.precision [INFO] [stdout] | _________________________________^ [INFO] [stdout] 806 | | .and_then(|prec| Some(min(prec, self.size as u32 - 18))); [INFO] [stdout] | |________________________________________________________________________^ help: try: `self.options.precision.map(|prec| min(prec, self.size as u32 - 18))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:812:17 [INFO] [stdout] | [INFO] [stdout] 812 | Self::MIN_FIXED_DECIMAL_POINT <= decimal_point && decimal_point <= Self::MAX_FIXED_DECIMAL_POINT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(Self::MIN_FIXED_DECIMAL_POINT..=Self::MAX_FIXED_DECIMAL_POINT).contains(&decimal_point)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:1086:33 [INFO] [stdout] | [INFO] [stdout] 1086 | ... 1 + p as usize [INFO] [stdout] | ^^^^^^^^^^ help: try: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lib.rs:1259:17 [INFO] [stdout] | [INFO] [stdout] 1258 | let length = self.ptr.offset_from(self.buffer) as usize; [INFO] [stdout] | -------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 1259 | length [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 1258 ~ [INFO] [stdout] 1259 ~ self.ptr.offset_from(self.buffer) as usize [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/lib.rs:1243:25 [INFO] [stdout] | [INFO] [stdout] 1243 | let k = scientific_exponent.abs() as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `scientific_exponent.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/lib.rs:1419:29 [INFO] [stdout] | [INFO] [stdout] 1419 | fmt.options.width = f.width().and_then(|x| Some(x as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f.width().map(|x| x as u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/lib.rs:1420:33 [INFO] [stdout] | [INFO] [stdout] 1420 | fmt.options.precision = f.precision().and_then(|x| Some(x as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f.precision().map(|x| x as u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> tests/rounding.rs:32:40 [INFO] [stdout] | [INFO] [stdout] 32 | let val = f64::from_str(&sval).expect(&format!("error converting {} to f64", sval)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("error converting {} to f64", sval))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> tests/rounding.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | value.push(step as u8 - INIT_STEP + INIT_DIGIT); [INFO] [stdout] | ^^^^^^^^^^ help: try: `step` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> tests/rounding.rs:92:20 [INFO] [stdout] | [INFO] [stdout] 92 | if step as u8 - INIT_STEP + INIT_DIGIT == STOP_DIGIT { [INFO] [stdout] | ^^^^^^^^^^ help: try: `step` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> tests/rounding.rs:105:56 [INFO] [stdout] | [INFO] [stdout] 105 | ... self.base.push(1 + digit as u8); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `digit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> tests/rounding.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | /// `pr` digits in the fractional part. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 139 | /// `pr` digits in the fractional part. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> tests/rounding.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | s.push(b'0'); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![b'0';SIZE]` [INFO] [stdout] = help: or `s.extend(std::iter::repeat_n(b'0', SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> tests/rounding.rs:163:27 [INFO] [stdout] | [INFO] [stdout] 163 | let ch = *s.iter().nth(pos + pr + 1).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] = note: `#[warn(clippy::iter_nth)]` on by default [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 163 - let ch = *s.iter().nth(pos + pr + 1).unwrap(); [INFO] [stdout] 163 + let ch = *s.get(pos + pr + 1).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> tests/rounding.rs:205:29 [INFO] [stdout] | [INFO] [stdout] 205 | ... s.push(b'0'); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![b'0';SIZE]` [INFO] [stdout] = help: or `s.extend(std::iter::repeat_n(b'0', SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> tests/rounding.rs:211:25 [INFO] [stdout] | [INFO] [stdout] 211 | s.push(b'0'); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![b'0';SIZE]` [INFO] [stdout] = help: or `s.extend(std::iter::repeat_n(b'0', SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> src/lib.rs:375:39 [INFO] [stdout] | [INFO] [stdout] 375 | const DIGITS100: &[u8; 200] = &[ [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 376 | | b'0', b'0', b'0', b'1', b'0', b'2', b'0', b'3', b'0', b'4', b'0', b'5', b'0', b'6', b'0', b'7', b'0', b'8', b'0', b'9', [INFO] [stdout] 377 | | b'1', b'0', b'1', b'1', b'1', b'2', b'1', b'3', b'1', b'4', b'1', b'5', b'1', b'6', b'1', b'7', b'1', b'8', b'1', b'9', [INFO] [stdout] 378 | | b'2', b'0', b'2', b'1', b'2', b'2', b'2', b'3', b'2', b'4', b'2', b'5', b'2', b'6', b'2', b'7', b'2', b'8', b'2', b'9', [INFO] [stdout] ... | [INFO] [stdout] 385 | | b'9', b'0', b'9', b'1', b'9', b'2', b'9', b'3', b'9', b'4', b'9', b'5', b'9', b'6', b'9', b'7', b'9', b'8', b'9', b'9', [INFO] [stdout] 386 | | ]; [INFO] [stdout] | |_________^ help: try: `b"00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/tests/test_ftoa.rs:20:38 [INFO] [stdout] | [INFO] [stdout] 20 | for (idx, (value, exp)) in tests.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/tests/test_ftoa.rs:53:38 [INFO] [stdout] | [INFO] [stdout] 53 | let f2 = f64::from_str(&res).expect(&format!("test #{i}: could not convert {f} -> '{res}' -> f64")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("test #{i}: could not convert {f} -> '{res}' -> f64"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/tests/test_format.rs:7:28 [INFO] [stdout] | [INFO] [stdout] 7 | fn test_format_opt(values: Vec<(f64, Option, Option, FmtMode, bool, &str)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion has a constant value [INFO] [stdout] --> src/tests/mod.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | assert!(NumFmtBuffer::MIN_FIXED_DECIMAL_POINT <= -1, "internal error"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider moving this into a const block: `const { assert!(..) }` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion has a constant value [INFO] [stdout] --> src/tests/mod.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | assert!(NumFmtBuffer::MIN_FIXED_DECIMAL_POINT >= -30, "internal error"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider moving this into a const block: `const { assert!(..) }` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion has a constant value [INFO] [stdout] --> src/tests/mod.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | assert!(NumFmtBuffer::MAX_FIXED_DECIMAL_POINT >= 1, "internal error"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider moving this into a const block: `const { assert!(..) }` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion has a constant value [INFO] [stdout] --> src/tests/mod.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | assert!(NumFmtBuffer::MAX_FIXED_DECIMAL_POINT <= 32, "internal error"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider moving this into a const block: `const { assert!(..) }` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/maths.rs:16:19 [INFO] [stdout] | [INFO] [stdout] 16 | debug_assert!(-1233 <= x && x <= 1233); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1233..=1233).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/maths.rs:662:19 [INFO] [stdout] | [INFO] [stdout] 662 | debug_assert!(K_MIN <= x && x <= K_MAX); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(K_MIN..=K_MAX).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/maths.rs:678:5 [INFO] [stdout] | [INFO] [stdout] 678 | return (value & ((1_u64 << e2) - 1)) == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 678 - return (value & ((1_u64 << e2) - 1)) == 0; [INFO] [stdout] 678 + (value & ((1_u64 << e2) - 1)) == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/maths.rs:677:19 [INFO] [stdout] | [INFO] [stdout] 677 | debug_assert!(0 <= e2 && e2 <= 64); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `(0..=64).contains(&e2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:206:23 [INFO] [stdout] | [INFO] [stdout] 206 | debug_assert!(-1500 <= q && q <= 1500); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1500..=1500).contains(&q)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:209:23 [INFO] [stdout] | [INFO] [stdout] 209 | debug_assert!(1 <= h && h <= 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `(1..=4).contains(&h)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NumFmtBuffer` [INFO] [stdout] --> src/lib.rs:356:5 [INFO] [stdout] | [INFO] [stdout] 356 | / pub fn new() -> Self { [INFO] [stdout] 357 | | let size = Self::BUFFER_LEN; [INFO] [stdout] 358 | | let layout = Layout::array::(size).expect("cannot create layout"); [INFO] [stdout] 359 | | let buffer = unsafe { alloc::alloc(layout) }; [INFO] [stdout] ... | [INFO] [stdout] 363 | | NumFmtBuffer { buffer, ptr: buffer, size, options: FmtOptions::default() } [INFO] [stdout] 364 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 353 + impl Default for NumFmtBuffer { [INFO] [stdout] 354 + fn default() -> Self { [INFO] [stdout] 355 + Self::new() [INFO] [stdout] 356 + } [INFO] [stdout] 357 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:422:23 [INFO] [stdout] | [INFO] [stdout] 422 | debug_assert!(1 <= value && value <= 99999999); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=99999999).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/lib.rs:430:28 [INFO] [stdout] | [INFO] [stdout] 430 | self.write_2digits(offset + 0, qh); [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/lib.rs:482:36 [INFO] [stdout] | [INFO] [stdout] 482 | self.write_2digits(offset + 0, rh); [INFO] [stdout] | ^^^^^^^^^^ help: consider reducing it to: `offset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:523:23 [INFO] [stdout] | [INFO] [stdout] 523 | debug_assert!(1 <= output && output <= 99, "output: {output}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=99).contains(&output)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:534:27 [INFO] [stdout] | [INFO] [stdout] 534 | debug_assert!(1 <= q && q <= 9); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `(1..=9).contains(&q)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:570:16 [INFO] [stdout] | [INFO] [stdout] 570 | if !tie || (tie && *ptr & 1 != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 570 - if !tie || (tie && *ptr & 1 != 0) { [INFO] [stdout] 570 + if !(tie && *ptr & 1 == 0) { [INFO] [stdout] | [INFO] [stdout] 570 - if !tie || (tie && *ptr & 1 != 0) { [INFO] [stdout] 570 + if !tie || *ptr & 1 != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/lib.rs:606:5 [INFO] [stdout] | [INFO] [stdout] 606 | unsafe fn simple_format(&mut self, decoded: Decoded) -> usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] = note: `#[warn(clippy::missing_safety_doc)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/lib.rs:671:26 [INFO] [stdout] | [INFO] [stdout] 671 | max(24, 20 + Self::MIN_FIXED_DECIMAL_POINT.abs() as usize), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `Self::MIN_FIXED_DECIMAL_POINT.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:688:25 [INFO] [stdout] | [INFO] [stdout] 688 | let use_fixed = Self::MIN_FIXED_DECIMAL_POINT <= decimal_point && decimal_point <= Self::MAX_FIXED_DECIMAL_POINT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(Self::MIN_FIXED_DECIMAL_POINT..=Self::MAX_FIXED_DECIMAL_POINT).contains(&decimal_point)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/lib.rs:761:21 [INFO] [stdout] | [INFO] [stdout] 761 | let k = scientific_exponent.abs() as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `scientific_exponent.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/lib.rs:782:26 [INFO] [stdout] | [INFO] [stdout] 782 | max(24, 20 + Self::MIN_FIXED_DECIMAL_POINT.abs() as usize), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `Self::MIN_FIXED_DECIMAL_POINT.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/lib.rs:803:25 [INFO] [stdout] | [INFO] [stdout] 803 | let width = self.options.width [INFO] [stdout] | _________________________^ [INFO] [stdout] 804 | | .and_then(|width| Some(min(width - decimal.sign as u32, self.size as u32))); [INFO] [stdout] | |___________________________________________________________________________________________^ help: try: `self.options.width.map(|width| min(width - decimal.sign as u32, self.size as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/lib.rs:805:33 [INFO] [stdout] | [INFO] [stdout] 805 | let mut precision = self.options.precision [INFO] [stdout] | _________________________________^ [INFO] [stdout] 806 | | .and_then(|prec| Some(min(prec, self.size as u32 - 18))); [INFO] [stdout] | |________________________________________________________________________^ help: try: `self.options.precision.map(|prec| min(prec, self.size as u32 - 18))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib.rs:812:17 [INFO] [stdout] | [INFO] [stdout] 812 | Self::MIN_FIXED_DECIMAL_POINT <= decimal_point && decimal_point <= Self::MAX_FIXED_DECIMAL_POINT; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(Self::MIN_FIXED_DECIMAL_POINT..=Self::MAX_FIXED_DECIMAL_POINT).contains(&decimal_point)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:1086:33 [INFO] [stdout] | [INFO] [stdout] 1086 | ... 1 + p as usize [INFO] [stdout] | ^^^^^^^^^^ help: try: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lib.rs:1259:17 [INFO] [stdout] | [INFO] [stdout] 1258 | let length = self.ptr.offset_from(self.buffer) as usize; [INFO] [stdout] | -------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 1259 | length [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 1258 ~ [INFO] [stdout] 1259 ~ self.ptr.offset_from(self.buffer) as usize [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/lib.rs:1243:25 [INFO] [stdout] | [INFO] [stdout] 1243 | let k = scientific_exponent.abs() as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `scientific_exponent.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/lib.rs:1419:29 [INFO] [stdout] | [INFO] [stdout] 1419 | fmt.options.width = f.width().and_then(|x| Some(x as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f.width().map(|x| x as u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/lib.rs:1420:33 [INFO] [stdout] | [INFO] [stdout] 1420 | fmt.options.precision = f.precision().and_then(|x| Some(x as u32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f.precision().map(|x| x as u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tests/mod.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | for f in vec![1.0, -1.0, f64::NAN, f64::INFINITY, f64::NEG_INFINITY, 0.0, 1e10, -1.5e-8] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[1.0, -1.0, f64::NAN, f64::INFINITY, f64::NEG_INFINITY, 0.0, 1e10, -1.5e-8]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> src/tests/test_ftoa.rs:47:26 [INFO] [stdout] | [INFO] [stdout] 47 | f = unsafe { mem::transmute::(ieee) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unnecessary_transmutes)]` on by default [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 47 - f = unsafe { mem::transmute::(ieee) }; [INFO] [stdout] 47 + f = unsafe { f64::from_bits(ieee) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.66s [INFO] running `Command { std: "docker" "inspect" "74b187e0559ddc9dae833be4f5194a00731fb9a66e2a5829f70d59f360f8a764", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "74b187e0559ddc9dae833be4f5194a00731fb9a66e2a5829f70d59f360f8a764", kill_on_drop: false }` [INFO] [stdout] 74b187e0559ddc9dae833be4f5194a00731fb9a66e2a5829f70d59f360f8a764