[INFO] fetching crate imagnum 0.2.30... [INFO] linting imagnum-0.2.30 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate imagnum 0.2.30 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate imagnum 0.2.30 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate imagnum 0.2.30 [INFO] tweaked toml for crates.io crate imagnum 0.2.30 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate imagnum 0.2.30 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] crate crates.io crate imagnum 0.2.30 already has a lockfile, it will not be regenerated [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] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded pastey v0.2.1 [INFO] [stderr] Downloaded syn v2.0.107 [INFO] [stderr] Downloaded bigdecimal v0.4.10 [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] b71597a61b2b9e6d4593454d6714cbc27931dd4e50d3f27062697f4f88ecba37 [INFO] running `Command { std: "docker" "start" "-a" "b71597a61b2b9e6d4593454d6714cbc27931dd4e50d3f27062697f4f88ecba37", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b71597a61b2b9e6d4593454d6714cbc27931dd4e50d3f27062697f4f88ecba37", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b71597a61b2b9e6d4593454d6714cbc27931dd4e50d3f27062697f4f88ecba37", kill_on_drop: false }` [INFO] [stdout] b71597a61b2b9e6d4593454d6714cbc27931dd4e50d3f27062697f4f88ecba37 [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] 538ad773f59db3c452de2afaaef55ead870f39e3aa4da4d01ad76b26f1cedd51 [INFO] running `Command { std: "docker" "start" "-a" "538ad773f59db3c452de2afaaef55ead870f39e3aa4da4d01ad76b26f1cedd51", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling libm v0.2.15 [INFO] [stderr] Compiling bigdecimal v0.4.10 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Compiling pastey v0.2.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking imagnum v0.2.30 (/opt/rustwide/workdir) [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Int` [INFO] [stdout] --> core/foundation.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | / pub fn new() -> Self { [INFO] [stdout] 77 | | Self::Big(BigInt::from(0)) [INFO] [stdout] 78 | | } [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] 71 + impl Default for Int { [INFO] [stdout] 72 + fn default() -> Self { [INFO] [stdout] 73 + Self::new() [INFO] [stdout] 74 + } [INFO] [stdout] 75 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:72:15 [INFO] [stdout] | [INFO] [stdout] 72 | pub const ZERO: Lazy = Lazy::new(|| Int::new()); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/foundation.rs:72:43 [INFO] [stdout] | [INFO] [stdout] 72 | pub const ZERO: Lazy = Lazy::new(|| Int::new()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Int::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:73:15 [INFO] [stdout] | [INFO] [stdout] 73 | pub const ONE: Lazy = Lazy::new(|| Int::from(1)); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:74:15 [INFO] [stdout] | [INFO] [stdout] 74 | pub const FOURTY_TWO: Lazy = Lazy::new(|| Int::from(42)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Float` [INFO] [stdout] --> core/foundation.rs:93:5 [INFO] [stdout] | [INFO] [stdout] 93 | / pub fn new() -> Self { [INFO] [stdout] 94 | | Self::Big(BigDecimal::from_str("0").unwrap()) [INFO] [stdout] 95 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 85 + impl Default for Float { [INFO] [stdout] 86 + fn default() -> Self { [INFO] [stdout] 87 + Self::new() [INFO] [stdout] 88 + } [INFO] [stdout] 89 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:86:15 [INFO] [stdout] | [INFO] [stdout] 86 | pub const NAN: Lazy = Lazy::new(|| Float::NaN); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:87:15 [INFO] [stdout] | [INFO] [stdout] 87 | pub const INFINITY: Lazy = Lazy::new(|| Float::Infinity); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:88:15 [INFO] [stdout] | [INFO] [stdout] 88 | pub const NEG_INFINITY: Lazy = Lazy::new(|| Float::NegInfinity); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:89:15 [INFO] [stdout] | [INFO] [stdout] 89 | pub const ONE: Lazy = Lazy::new(|| Float::from(1.0)); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:90:15 [INFO] [stdout] | [INFO] [stdout] 90 | pub const ZERO: Lazy = Lazy::new(|| Float::new()); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/foundation.rs:90:45 [INFO] [stdout] | [INFO] [stdout] 90 | pub const ZERO: Lazy = Lazy::new(|| Float::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Float::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | pub const FOURTY_TWO: Lazy = Lazy::new(|| Float::from(42.0)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> core/impls.rs:317:12 [INFO] [stdout] | [INFO] [stdout] 317 | if radix < 2 || radix > 36 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(2..=36).contains(&radix)` [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] --> core/impls.rs:349:12 [INFO] [stdout] | [INFO] [stdout] 349 | if radix < 2 || radix > 36 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(2..=36).contains(&radix)` [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: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> core/impls.rs:360:5 [INFO] [stdout] | [INFO] [stdout] 360 | / pub fn from_str(value: &str) -> Result { [INFO] [stdout] 361 | | if value.is_empty() { [INFO] [stdout] 362 | | return Err(ERR_INVALID_FORMAT); [INFO] [stdout] ... | [INFO] [stdout] 368 | | Ok(int) [INFO] [stdout] 369 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/impls.rs:401:28 [INFO] [stdout] | [INFO] [stdout] 401 | let neg_imag = Float::Big(BigDecimal::from(0))._sub(imag).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 401 - let neg_imag = Float::Big(BigDecimal::from(0))._sub(imag).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 401 + let neg_imag = Float::Big(BigDecimal::from(0))._sub(imag).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:529:9 [INFO] [stdout] | [INFO] [stdout] 529 | / if k1 == FloatKind::Finite && k2 == FloatKind::Finite { [INFO] [stdout] 530 | | if let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 531 | | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] 532 | | crate::compat::float_to_bigdecimal(other), [INFO] [stdout] ... | [INFO] [stdout] 537 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 529 ~ if k1 == FloatKind::Finite && k2 == FloatKind::Finite [INFO] [stdout] 530 ~ && let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 531 | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] ... [INFO] [stdout] 535 | return Ok(Float::Big(res)); [INFO] [stdout] 536 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:596:9 [INFO] [stdout] | [INFO] [stdout] 596 | / if k1 == FloatKind::Finite && k2 == FloatKind::Finite { [INFO] [stdout] 597 | | if let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 598 | | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] 599 | | crate::compat::float_to_bigdecimal(other), [INFO] [stdout] ... | [INFO] [stdout] 604 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 596 ~ if k1 == FloatKind::Finite && k2 == FloatKind::Finite [INFO] [stdout] 597 ~ && let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 598 | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] ... [INFO] [stdout] 602 | return Ok(Float::Big(res)); [INFO] [stdout] 603 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:606:9 [INFO] [stdout] | [INFO] [stdout] 606 | / if k1 == FloatKind::Irrational && k2 == FloatKind::Irrational { [INFO] [stdout] 607 | | if let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 608 | | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] 609 | | crate::compat::float_to_bigdecimal(other), [INFO] [stdout] ... | [INFO] [stdout] 614 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 606 ~ if k1 == FloatKind::Irrational && k2 == FloatKind::Irrational [INFO] [stdout] 607 ~ && let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 608 | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] ... [INFO] [stdout] 612 | return Ok(Float::Irrational(res)); [INFO] [stdout] 613 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:683:9 [INFO] [stdout] | [INFO] [stdout] 683 | / if k1 == FloatKind::Finite && k2 == FloatKind::Finite { [INFO] [stdout] 684 | | if let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 685 | | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] 686 | | crate::compat::float_to_bigdecimal(other), [INFO] [stdout] ... | [INFO] [stdout] 691 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 683 ~ if k1 == FloatKind::Finite && k2 == FloatKind::Finite [INFO] [stdout] 684 ~ && let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 685 | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] ... [INFO] [stdout] 689 | return Ok(Float::Big(res)); [INFO] [stdout] 690 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> core/impls.rs:812:13 [INFO] [stdout] | [INFO] [stdout] 812 | e1 >= 0 || (e1 < 0 && (-(e1) as usize) <= m1.len() && m1.chars().all(|c| c == '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] 812 - e1 >= 0 || (e1 < 0 && (-(e1) as usize) <= m1.len() && m1.chars().all(|c| c == '0')); [INFO] [stdout] 812 + (m1.chars().all(|c| c == '0') || e1 >= 0) && ((-(e1) as usize) <= m1.len() || e1 >= 0); [INFO] [stdout] | [INFO] [stdout] 812 - e1 >= 0 || (e1 < 0 && (-(e1) as usize) <= m1.len() && m1.chars().all(|c| c == '0')); [INFO] [stdout] 812 + e1 >= 0 || (-(e1) as usize) <= m1.len() && m1.chars().all(|c| c == '0'); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> core/impls.rs:814:13 [INFO] [stdout] | [INFO] [stdout] 814 | e2 >= 0 || (e2 < 0 && (-(e2) as usize) <= m2.len() && m2.chars().all(|c| c == '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] help: try [INFO] [stdout] | [INFO] [stdout] 814 - e2 >= 0 || (e2 < 0 && (-(e2) as usize) <= m2.len() && m2.chars().all(|c| c == '0')); [INFO] [stdout] 814 + (m2.chars().all(|c| c == '0') || e2 >= 0) && ((-(e2) as usize) <= m2.len() || e2 >= 0); [INFO] [stdout] | [INFO] [stdout] 814 - e2 >= 0 || (e2 < 0 && (-(e2) as usize) <= m2.len() && m2.chars().all(|c| c == '0')); [INFO] [stdout] 814 + e2 >= 0 || (-(e2) as usize) <= m2.len() && m2.chars().all(|c| c == '0'); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:832:17 [INFO] [stdout] | [INFO] [stdout] 832 | num = num / &g; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `num /= &g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:833:17 [INFO] [stdout] | [INFO] [stdout] 833 | den = den / &g; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `den /= &g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:837:17 [INFO] [stdout] | [INFO] [stdout] 837 | d = d / BigInt::from(2u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `d /= BigInt::from(2u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:840:17 [INFO] [stdout] | [INFO] [stdout] 840 | d = d / BigInt::from(5u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `d /= BigInt::from(5u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:853:17 [INFO] [stdout] | [INFO] [stdout] 853 | rem = rem * BigInt::from(10u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rem *= BigInt::from(10u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:856:17 [INFO] [stdout] | [INFO] [stdout] 856 | rem = rem % &den_abs; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rem %= &den_abs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> core/impls.rs:962:66 [INFO] [stdout] | [INFO] [stdout] 962 | let (num, den) = crate::math::bigdecimal_to_fraction(&exp_bd); [INFO] [stdout] | ^^^^^^^ help: change this to: `exp_bd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:963:13 [INFO] [stdout] | [INFO] [stdout] 963 | / if den != num_bigint::BigInt::from(1u32) { [INFO] [stdout] 964 | | if let Some(den_u64) = den.to_u64() { [INFO] [stdout] 965 | | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 966 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] ... | [INFO] [stdout] 973 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 963 ~ if den != num_bigint::BigInt::from(1u32) [INFO] [stdout] 964 ~ && let Some(den_u64) = den.to_u64() { [INFO] [stdout] 965 | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] ... [INFO] [stdout] 971 | } [INFO] [stdout] 972 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:964:17 [INFO] [stdout] | [INFO] [stdout] 964 | / if let Some(den_u64) = den.to_u64() { [INFO] [stdout] 965 | | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 966 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 967 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] ... | [INFO] [stdout] 972 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 964 ~ if let Some(den_u64) = den.to_u64() [INFO] [stdout] 965 ~ && den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 966 | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] ... [INFO] [stdout] 970 | } [INFO] [stdout] 971 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:965:21 [INFO] [stdout] | [INFO] [stdout] 965 | / if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 966 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 967 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 968 | | return Ok(Float::Big(res_bd)); [INFO] [stdout] ... | [INFO] [stdout] 971 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 965 ~ if den_u64 > 0 && den_u64 <= 200 [INFO] [stdout] 966 ~ && let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 967 | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 968 | return Ok(Float::Big(res_bd)); [INFO] [stdout] 969 | } [INFO] [stdout] 970 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:966:25 [INFO] [stdout] | [INFO] [stdout] 966 | / if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 967 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 968 | | return Ok(Float::Big(res_bd)); [INFO] [stdout] 969 | | } [INFO] [stdout] 970 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 966 ~ if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) [INFO] [stdout] 967 ~ && let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 968 | return Ok(Float::Big(res_bd)); [INFO] [stdout] 969 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:975:13 [INFO] [stdout] | [INFO] [stdout] 975 | / if let Some(exp_f64) = exp_bd.to_f64() { [INFO] [stdout] 976 | | if let Some((p_u64, q_u64)) = approx_rational_from_f64(exp_f64, 200) { [INFO] [stdout] 977 | | if q_u64 > 0 && q_u64 <= 200 { [INFO] [stdout] 978 | | if p_u64 == 0 { [INFO] [stdout] ... | [INFO] [stdout] 990 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 975 ~ if let Some(exp_f64) = exp_bd.to_f64() [INFO] [stdout] 976 ~ && let Some((p_u64, q_u64)) = approx_rational_from_f64(exp_f64, 200) { [INFO] [stdout] 977 | if q_u64 > 0 && q_u64 <= 200 { [INFO] [stdout] ... [INFO] [stdout] 988 | } [INFO] [stdout] 989 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:976:17 [INFO] [stdout] | [INFO] [stdout] 976 | / if let Some((p_u64, q_u64)) = approx_rational_from_f64(exp_f64, 200) { [INFO] [stdout] 977 | | if q_u64 > 0 && q_u64 <= 200 { [INFO] [stdout] 978 | | if p_u64 == 0 { [INFO] [stdout] 979 | | return Ok(make_float_from_parts("1".to_string(), 0, false, FloatKind::Finite)); [INFO] [stdout] ... | [INFO] [stdout] 989 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 976 ~ if let Some((p_u64, q_u64)) = approx_rational_from_f64(exp_f64, 200) [INFO] [stdout] 977 ~ && q_u64 > 0 && q_u64 <= 200 { [INFO] [stdout] 978 | if p_u64 == 0 { [INFO] [stdout] ... [INFO] [stdout] 987 | } [INFO] [stdout] 988 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:983:49 [INFO] [stdout] | [INFO] [stdout] 983 | ... for _ in 0..p_u64 { pow_bd = pow_bd * base_bd.clone(); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pow_bd *= base_bd.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:993:9 [INFO] [stdout] | [INFO] [stdout] 993 | / if exponent.is_integer_like() { [INFO] [stdout] 994 | | if let Some(exp_bd) = crate::compat::float_to_bigdecimal(exponent) { [INFO] [stdout] 995 | | let (mant, exp_i32, neg) = crate::math::from_bigdecimal(&exp_bd); [INFO] [stdout] 996 | | let mut digits = mant; [INFO] [stdout] ... | [INFO] [stdout] 1015 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 993 ~ if exponent.is_integer_like() [INFO] [stdout] 994 ~ && let Some(exp_bd) = crate::compat::float_to_bigdecimal(exponent) { [INFO] [stdout] 995 | let (mant, exp_i32, neg) = crate::math::from_bigdecimal(&exp_bd); [INFO] [stdout] ... [INFO] [stdout] 1013 | } [INFO] [stdout] 1014 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> core/impls.rs:1004:17 [INFO] [stdout] | [INFO] [stdout] 1004 | / match BigInt::from_str(&digits) { [INFO] [stdout] 1005 | | Ok(mut bi) => { [INFO] [stdout] 1006 | | if neg { bi = -bi; } [INFO] [stdout] 1007 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] ... | [INFO] [stdout] 1012 | | Err(_) => {} [INFO] [stdout] 1013 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1004 ~ if let Ok(mut bi) = BigInt::from_str(&digits) { [INFO] [stdout] 1005 + if neg { bi = -bi; } [INFO] [stdout] 1006 + if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 1007 + let res_bd = bigdecimal_pow_integer(base_bd.clone(), bi); [INFO] [stdout] 1008 + return Ok(Float::Big(res_bd)); [INFO] [stdout] 1009 + } [INFO] [stdout] 1010 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:1019:13 [INFO] [stdout] | [INFO] [stdout] 1019 | / if den != num_bigint::BigInt::from(1u32) { [INFO] [stdout] 1020 | | if let Some(den_u64) = den.to_u64() { [INFO] [stdout] 1021 | | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 1022 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] ... | [INFO] [stdout] 1029 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1019 ~ if den != num_bigint::BigInt::from(1u32) [INFO] [stdout] 1020 ~ && let Some(den_u64) = den.to_u64() { [INFO] [stdout] 1021 | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] ... [INFO] [stdout] 1027 | } [INFO] [stdout] 1028 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:1020:17 [INFO] [stdout] | [INFO] [stdout] 1020 | / if let Some(den_u64) = den.to_u64() { [INFO] [stdout] 1021 | | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 1022 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 1023 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] ... | [INFO] [stdout] 1028 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1020 ~ if let Some(den_u64) = den.to_u64() [INFO] [stdout] 1021 ~ && den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 1022 | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] ... [INFO] [stdout] 1026 | } [INFO] [stdout] 1027 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:1021:21 [INFO] [stdout] | [INFO] [stdout] 1021 | / if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 1022 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 1023 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 1024 | | return Ok(Float::Big(res_bd)); [INFO] [stdout] ... | [INFO] [stdout] 1027 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1021 ~ if den_u64 > 0 && den_u64 <= 200 [INFO] [stdout] 1022 ~ && let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 1023 | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 1024 | return Ok(Float::Big(res_bd)); [INFO] [stdout] 1025 | } [INFO] [stdout] 1026 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:1022:25 [INFO] [stdout] | [INFO] [stdout] 1022 | / if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 1023 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 1024 | | return Ok(Float::Big(res_bd)); [INFO] [stdout] 1025 | | } [INFO] [stdout] 1026 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1022 ~ if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) [INFO] [stdout] 1023 ~ && let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 1024 | return Ok(Float::Big(res_bd)); [INFO] [stdout] 1025 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> core/impls.rs:1088:9 [INFO] [stdout] | [INFO] [stdout] 1088 | / self._pow(exponent).or_else(|_| { [INFO] [stdout] 1089 | | if float_kind(self) == FloatKind::NaN || float_kind(exponent) == FloatKind::NaN { [INFO] [stdout] 1090 | | Err(ERR_INVALID_FORMAT) [INFO] [stdout] 1091 | | } else if float_kind(self) == FloatKind::Infinity [INFO] [stdout] ... | [INFO] [stdout] 1098 | | }) [INFO] [stdout] | |__________^ [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] help: use `map_err` instead [INFO] [stdout] | [INFO] [stdout] 1088 ~ self._pow(exponent).map_err(|_| { [INFO] [stdout] 1089 | if float_kind(self) == FloatKind::NaN || float_kind(exponent) == FloatKind::NaN { [INFO] [stdout] 1090 ~ ERR_INVALID_FORMAT [INFO] [stdout] 1091 | } else if float_kind(self) == FloatKind::Infinity [INFO] [stdout] 1092 | || float_kind(self) == FloatKind::NegInfinity [INFO] [stdout] 1093 | { [INFO] [stdout] 1094 ~ ERR_INFINITE_RESULT [INFO] [stdout] 1095 | } else { [INFO] [stdout] 1096 ~ ERR_UNIMPLEMENTED [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/impls.rs:1103:24 [INFO] [stdout] | [INFO] [stdout] 1103 | let a_sq = real._mul(real).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 1103 - let a_sq = real._mul(real).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 1103 + let a_sq = real._mul(real).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/impls.rs:1104:24 [INFO] [stdout] | [INFO] [stdout] 1104 | let b_sq = imag._mul(imag).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 1104 - let b_sq = imag._mul(imag).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 1104 + let b_sq = imag._mul(imag).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/impls.rs:1105:23 [INFO] [stdout] | [INFO] [stdout] 1105 | let sum = a_sq._add(&b_sq).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 1105 - let sum = a_sq._add(&b_sq).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 1105 + let sum = a_sq._add(&b_sq).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> core/impls.rs:1442:5 [INFO] [stdout] | [INFO] [stdout] 1442 | / pub fn from_str(value: &str) -> Result { [INFO] [stdout] 1443 | | if value.is_empty() { [INFO] [stdout] 1444 | | return Err(ERR_INVALID_FORMAT); [INFO] [stdout] ... | [INFO] [stdout] 1451 | | Ok(float) [INFO] [stdout] 1452 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> core/impls.rs:1459:32 [INFO] [stdout] | [INFO] [stdout] 1459 | if (mant.is_empty() && !(exp >= 0)) || !mant.chars().all(|c| c.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `(exp < 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> core/impls.rs:1459:70 [INFO] [stdout] | [INFO] [stdout] 1459 | if (mant.is_empty() && !(exp >= 0)) || !mant.chars().all(|c| c.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:1526:9 [INFO] [stdout] | [INFO] [stdout] 1526 | / if k == FloatKind::Recurring { [INFO] [stdout] 1527 | | if let Float::Recurring(ref bd) = *self { [INFO] [stdout] 1528 | | let n = bd.normalized(); [INFO] [stdout] 1529 | | let int_candidate = n.with_scale(0); [INFO] [stdout] ... | [INFO] [stdout] 1561 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1526 ~ if k == FloatKind::Recurring [INFO] [stdout] 1527 ~ && let Float::Recurring(ref bd) = *self { [INFO] [stdout] 1528 | let n = bd.normalized(); [INFO] [stdout] ... [INFO] [stdout] 1559 | } [INFO] [stdout] 1560 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:2036:9 [INFO] [stdout] | [INFO] [stdout] 2036 | / if self.is_complex() && n.is_complex() { [INFO] [stdout] 2037 | | if let (Float::Complex(r1, i1), Float::Complex(r2, i2)) = (self, n) { [INFO] [stdout] 2038 | | return r1.approx_eq(r2, epsilon) && i1.approx_eq(i2, epsilon); [INFO] [stdout] 2039 | | } [INFO] [stdout] 2040 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2036 ~ if self.is_complex() && n.is_complex() [INFO] [stdout] 2037 ~ && let (Float::Complex(r1, i1), Float::Complex(r2, i2)) = (self, n) { [INFO] [stdout] 2038 | return r1.approx_eq(r2, epsilon) && i1.approx_eq(i2, epsilon); [INFO] [stdout] 2039 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> core/math.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / s.chars() [INFO] [stdout] 39 | | .rev() [INFO] [stdout] 40 | | .next() [INFO] [stdout] 41 | | .map_or(false, |c| c.to_digit(10).unwrap_or(0) % 2 == 1) [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 41 - .map_or(false, |c| c.to_digit(10).unwrap_or(0) % 2 == 1) [INFO] [stdout] 41 + .is_some_and(|c| c.to_digit(10).unwrap_or(0) % 2 == 1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual backwards iteration [INFO] [stdout] --> core/math.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | s.chars() [INFO] [stdout] | ______________^ [INFO] [stdout] 39 | | .rev() [INFO] [stdout] 40 | | .next() [INFO] [stdout] | |_______________^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] = note: `#[warn(clippy::manual_next_back)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | e = e >> 1u32; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `e >>= 1u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> core/math.rs:122:11 [INFO] [stdout] | [INFO] [stdout] 122 | while &low < &high { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 122 - while &low < &high { [INFO] [stdout] 122 + while low < high { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:239:13 [INFO] [stdout] | [INFO] [stdout] 239 | result = result * base.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result *= base.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:241:9 [INFO] [stdout] | [INFO] [stdout] 241 | e = e >> 1u32; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `e >>= 1u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> core/math.rs:247:22 [INFO] [stdout] | [INFO] [stdout] 247 | if result == BigDecimal::from(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> core/math.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | if a.is_negative() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `a.is_negative();` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:286:13 [INFO] [stdout] | [INFO] [stdout] 286 | x_pow = x_pow * x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x_pow *= x.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:314:9 [INFO] [stdout] | [INFO] [stdout] 314 | x_pow_n = x_pow_n * x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x_pow_n *= x.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:349:9 [INFO] [stdout] | [INFO] [stdout] 349 | base_pow = base_pow * base.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base_pow *= base.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:350:9 [INFO] [stdout] | [INFO] [stdout] 350 | n = n - BigInt::from(1u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n -= BigInt::from(1u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> core/math.rs:447:70 [INFO] [stdout] | [INFO] [stdout] 447 | let bd = BigDecimal::new(scaled_num / denom_for_decimal, scale as i64); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `scale` [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: redundant closure [INFO] [stdout] --> core/math.rs:501:57 [INFO] [stdout] | [INFO] [stdout] 501 | let bd = BigDecimal::from_f64(v).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:516:58 [INFO] [stdout] | [INFO] [stdout] 516 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:535:58 [INFO] [stdout] | [INFO] [stdout] 535 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:546:58 [INFO] [stdout] | [INFO] [stdout] 546 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:559:58 [INFO] [stdout] | [INFO] [stdout] 559 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:572:58 [INFO] [stdout] | [INFO] [stdout] 572 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:585:58 [INFO] [stdout] | [INFO] [stdout] 585 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:598:58 [INFO] [stdout] | [INFO] [stdout] 598 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:633:58 [INFO] [stdout] | [INFO] [stdout] 633 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:652:58 [INFO] [stdout] | [INFO] [stdout] 652 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:663:58 [INFO] [stdout] | [INFO] [stdout] 663 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:673:58 [INFO] [stdout] | [INFO] [stdout] 673 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:686:58 [INFO] [stdout] | [INFO] [stdout] 686 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:696:58 [INFO] [stdout] | [INFO] [stdout] 696 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:69:6 [INFO] [stdout] | [INFO] [stdout] 69 | impl<'a> Add for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 69 - impl<'a> Add for &'a Int { [INFO] [stdout] 69 + impl Add for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:83:6 [INFO] [stdout] | [INFO] [stdout] 83 | impl<'a> Sub for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 83 - impl<'a> Sub for &'a Int { [INFO] [stdout] 83 + impl Sub for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:97:6 [INFO] [stdout] | [INFO] [stdout] 97 | impl<'a> Mul for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 97 - impl<'a> Mul for &'a Int { [INFO] [stdout] 97 + impl Mul for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:111:6 [INFO] [stdout] | [INFO] [stdout] 111 | impl<'a> Div for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 111 - impl<'a> Div for &'a Int { [INFO] [stdout] 111 + impl Div for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 125 | impl<'a> Rem for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 125 - impl<'a> Rem for &'a Int { [INFO] [stdout] 125 + impl Rem for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:215:17 [INFO] [stdout] | [INFO] [stdout] 215 | return Some(a.cmp(b)); [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] 215 - return Some(a.cmp(b)); [INFO] [stdout] 215 + Some(a.cmp(b)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:219:17 [INFO] [stdout] | [INFO] [stdout] 219 | return Some(a.cmp(b)); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 219 - return Some(a.cmp(b)); [INFO] [stdout] 219 + Some(a.cmp(b)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:226:17 [INFO] [stdout] | [INFO] [stdout] 226 | return Some(a_big.cmp(&b_big)); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 226 - return Some(a_big.cmp(&b_big)); [INFO] [stdout] 226 + Some(a_big.cmp(&b_big)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:337:6 [INFO] [stdout] | [INFO] [stdout] 337 | impl<'a> Add for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 337 - impl<'a> Add for &'a Float { [INFO] [stdout] 337 + impl Add for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:351:6 [INFO] [stdout] | [INFO] [stdout] 351 | impl<'a> Sub for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 351 - impl<'a> Sub for &'a Float { [INFO] [stdout] 351 + impl Sub for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:365:6 [INFO] [stdout] | [INFO] [stdout] 365 | impl<'a> Mul for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 365 - impl<'a> Mul for &'a Float { [INFO] [stdout] 365 + impl Mul for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:379:6 [INFO] [stdout] | [INFO] [stdout] 379 | impl<'a> Div for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 379 - impl<'a> Div for &'a Float { [INFO] [stdout] 379 + impl Div for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:393:6 [INFO] [stdout] | [INFO] [stdout] 393 | impl<'a> Rem for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 393 - impl<'a> Rem for &'a Float { [INFO] [stdout] 393 + impl Rem for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/ops.rs:411:17 [INFO] [stdout] | [INFO] [stdout] 411 | *self = self._add(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 411 - *self = self._add(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 411 + *self = self._add(&other).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/ops.rs:417:17 [INFO] [stdout] | [INFO] [stdout] 417 | *self = self._sub(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 417 - *self = self._sub(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 417 + *self = self._sub(&other).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/ops.rs:423:17 [INFO] [stdout] | [INFO] [stdout] 423 | *self = self._mul(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 423 - *self = self._mul(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 423 + *self = self._mul(&other).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/ops.rs:429:17 [INFO] [stdout] | [INFO] [stdout] 429 | *self = self._div(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 429 - *self = self._div(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 429 + *self = self._div(&other).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/ops.rs:435:17 [INFO] [stdout] | [INFO] [stdout] 435 | *self = self._modulo(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 435 - *self = self._modulo(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 435 + *self = self._modulo(&other).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:446:17 [INFO] [stdout] | [INFO] [stdout] 446 | return Some(a_bd.normalized().cmp(&b_bd.normalized())); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 446 - return Some(a_bd.normalized().cmp(&b_bd.normalized())); [INFO] [stdout] 446 + Some(a_bd.normalized().cmp(&b_bd.normalized())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:458:17 [INFO] [stdout] | [INFO] [stdout] 458 | return a_v.partial_cmp(&b_v); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 458 - return a_v.partial_cmp(&b_v); [INFO] [stdout] 458 + a_v.partial_cmp(&b_v) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:465:17 [INFO] [stdout] | [INFO] [stdout] 465 | return None; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 465 - return None; [INFO] [stdout] 465 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:468:41 [INFO] [stdout] | [INFO] [stdout] 468 | (Float::NaN, Float::NaN) => return Some(Ordering::Equal), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 468 - (Float::NaN, Float::NaN) => return Some(Ordering::Equal), [INFO] [stdout] 468 + (Float::NaN, Float::NaN) => Some(Ordering::Equal), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:469:50 [INFO] [stdout] | [INFO] [stdout] 469 | (Float::NaN, _) | (_, Float::NaN) => return None, [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 469 - (Float::NaN, _) | (_, Float::NaN) => return None, [INFO] [stdout] 469 + (Float::NaN, _) | (_, Float::NaN) => None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:470:51 [INFO] [stdout] | [INFO] [stdout] 470 | (Float::Infinity, Float::Infinity) => return Some(Ordering::Equal), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 470 - (Float::Infinity, Float::Infinity) => return Some(Ordering::Equal), [INFO] [stdout] 470 + (Float::Infinity, Float::Infinity) => Some(Ordering::Equal), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:471:57 [INFO] [stdout] | [INFO] [stdout] 471 | (Float::NegInfinity, Float::NegInfinity) => return Some(Ordering::Equal), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 471 - (Float::NegInfinity, Float::NegInfinity) => return Some(Ordering::Equal), [INFO] [stdout] 471 + (Float::NegInfinity, Float::NegInfinity) => Some(Ordering::Equal), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:472:37 [INFO] [stdout] | [INFO] [stdout] 472 | (Float::Infinity, _) => return Some(Ordering::Greater), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 472 - (Float::Infinity, _) => return Some(Ordering::Greater), [INFO] [stdout] 472 + (Float::Infinity, _) => Some(Ordering::Greater), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:473:37 [INFO] [stdout] | [INFO] [stdout] 473 | (_, Float::Infinity) => return Some(Ordering::Less), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 473 - (_, Float::Infinity) => return Some(Ordering::Less), [INFO] [stdout] 473 + (_, Float::Infinity) => Some(Ordering::Less), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:474:40 [INFO] [stdout] | [INFO] [stdout] 474 | (Float::NegInfinity, _) => return Some(Ordering::Less), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 474 - (Float::NegInfinity, _) => return Some(Ordering::Less), [INFO] [stdout] 474 + (Float::NegInfinity, _) => Some(Ordering::Less), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:475:40 [INFO] [stdout] | [INFO] [stdout] 475 | (_, Float::NegInfinity) => return Some(Ordering::Greater), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 475 - (_, Float::NegInfinity) => return Some(Ordering::Greater), [INFO] [stdout] 475 + (_, Float::NegInfinity) => Some(Ordering::Greater), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:481:17 [INFO] [stdout] | [INFO] [stdout] 481 | return None; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 481 - return None; [INFO] [stdout] 481 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/ops.rs:540:9 [INFO] [stdout] | [INFO] [stdout] 540 | / if k == FloatKind::Recurring { [INFO] [stdout] 541 | | if let Float::Recurring(ref bd) = *self { [INFO] [stdout] 542 | | let s = bd.normalized().to_string(); [INFO] [stdout] 543 | | let parts: Vec<&str> = s.split('E').collect(); [INFO] [stdout] ... | [INFO] [stdout] 627 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 540 ~ if k == FloatKind::Recurring [INFO] [stdout] 541 ~ && let Float::Recurring(ref bd) = *self { [INFO] [stdout] 542 | let s = bd.normalized().to_string(); [INFO] [stdout] ... [INFO] [stdout] 625 | } [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> core/ops.rs:602:32 [INFO] [stdout] | [INFO] [stdout] 602 | ... if &frac[i..i + take] != &rep[..take] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 602 - if &frac[i..i + take] != &rep[..take] { [INFO] [stdout] 602 + if frac[i..i + take] != rep[..take] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> core/ops.rs:634:42 [INFO] [stdout] | [INFO] [stdout] 634 | if k == FloatKind::Irrational || (exp >= -50 && exp <= 50) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-50..=50).contains(&exp)` [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 `Int` [INFO] [stdout] --> core/foundation.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | / pub fn new() -> Self { [INFO] [stdout] 77 | | Self::Big(BigInt::from(0)) [INFO] [stdout] 78 | | } [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] 71 + impl Default for Int { [INFO] [stdout] 72 + fn default() -> Self { [INFO] [stdout] 73 + Self::new() [INFO] [stdout] 74 + } [INFO] [stdout] 75 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:72:15 [INFO] [stdout] | [INFO] [stdout] 72 | pub const ZERO: Lazy = Lazy::new(|| Int::new()); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/foundation.rs:72:43 [INFO] [stdout] | [INFO] [stdout] 72 | pub const ZERO: Lazy = Lazy::new(|| Int::new()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Int::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:752:6 [INFO] [stdout] | [INFO] [stdout] 752 | impl<'a> BitAnd for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 752 - impl<'a> BitAnd for &'a Int { [INFO] [stdout] 752 + impl BitAnd for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:73:15 [INFO] [stdout] | [INFO] [stdout] 73 | pub const ONE: Lazy = Lazy::new(|| Int::from(1)); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:74:15 [INFO] [stdout] | [INFO] [stdout] 74 | pub const FOURTY_TWO: Lazy = Lazy::new(|| Int::from(42)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:780:6 [INFO] [stdout] | [INFO] [stdout] 780 | impl<'a> BitOr for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 780 - impl<'a> BitOr for &'a Int { [INFO] [stdout] 780 + impl BitOr for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:808:6 [INFO] [stdout] | [INFO] [stdout] 808 | impl<'a> BitXor for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 808 - impl<'a> BitXor for &'a Int { [INFO] [stdout] 808 + impl BitXor for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:829:6 [INFO] [stdout] | [INFO] [stdout] 829 | impl<'a> Not for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 829 - impl<'a> Not for &'a Int { [INFO] [stdout] 829 + impl Not for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:850:6 [INFO] [stdout] | [INFO] [stdout] 850 | impl<'a> Shl for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 850 - impl<'a> Shl for &'a Int { [INFO] [stdout] 850 + impl Shl for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Float` [INFO] [stdout] --> core/foundation.rs:93:5 [INFO] [stdout] | [INFO] [stdout] 93 | / pub fn new() -> Self { [INFO] [stdout] 94 | | Self::Big(BigDecimal::from_str("0").unwrap()) [INFO] [stdout] 95 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 85 + impl Default for Float { [INFO] [stdout] 86 + fn default() -> Self { [INFO] [stdout] 87 + Self::new() [INFO] [stdout] 88 + } [INFO] [stdout] 89 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:86:15 [INFO] [stdout] | [INFO] [stdout] 86 | pub const NAN: Lazy = Lazy::new(|| Float::NaN); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:87:15 [INFO] [stdout] | [INFO] [stdout] 87 | pub const INFINITY: Lazy = Lazy::new(|| Float::Infinity); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:88:15 [INFO] [stdout] | [INFO] [stdout] 88 | pub const NEG_INFINITY: Lazy = Lazy::new(|| Float::NegInfinity); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:89:15 [INFO] [stdout] | [INFO] [stdout] 89 | pub const ONE: Lazy = Lazy::new(|| Float::from(1.0)); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:90:15 [INFO] [stdout] | [INFO] [stdout] 90 | pub const ZERO: Lazy = Lazy::new(|| Float::new()); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/foundation.rs:90:45 [INFO] [stdout] | [INFO] [stdout] 90 | pub const ZERO: Lazy = Lazy::new(|| Float::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Float::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> core/foundation.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | pub const FOURTY_TWO: Lazy = Lazy::new(|| Float::from(42.0)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:878:6 [INFO] [stdout] | [INFO] [stdout] 878 | impl<'a> Shr for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 878 - impl<'a> Shr for &'a Int { [INFO] [stdout] 878 + impl Shr for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:908:14 [INFO] [stdout] | [INFO] [stdout] 908 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 908 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 908 + (Float::Big(a), &Float::Big(ref b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:908:34 [INFO] [stdout] | [INFO] [stdout] 908 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 908 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 908 + (&Float::Big(ref a), Float::Big(b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:955:14 [INFO] [stdout] | [INFO] [stdout] 955 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 955 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 955 + (Float::Big(a), &Float::Big(ref b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:955:34 [INFO] [stdout] | [INFO] [stdout] 955 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 955 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 955 + (&Float::Big(ref a), Float::Big(b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:1002:14 [INFO] [stdout] | [INFO] [stdout] 1002 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1002 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 1002 + (Float::Big(a), &Float::Big(ref b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:1002:34 [INFO] [stdout] | [INFO] [stdout] 1002 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1002 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 1002 + (&Float::Big(ref a), Float::Big(b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> core/ops.rs:1030:9 [INFO] [stdout] | [INFO] [stdout] 1030 | / match self { [INFO] [stdout] 1031 | | &Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1032 | | let bits = a.to_bits(); [INFO] [stdout] 1033 | | let res_bits = bits << shift_usize; [INFO] [stdout] ... | [INFO] [stdout] 1046 | | _ => Err(crate::math::ERR_UNIMPLEMENTED), [INFO] [stdout] 1047 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 1030 ~ match *self { [INFO] [stdout] 1031 ~ Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1032 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1035 | } [INFO] [stdout] 1036 ~ Float::Small(crate::foundation::SmallFloat::F64(a)) => { [INFO] [stdout] 1037 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1040 | } [INFO] [stdout] 1041 ~ Float::Big(ref a) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:1041:13 [INFO] [stdout] | [INFO] [stdout] 1041 | &Float::Big(ref a) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1041 - &Float::Big(ref a) => { [INFO] [stdout] 1041 + Float::Big(a) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> core/ops.rs:1063:9 [INFO] [stdout] | [INFO] [stdout] 1063 | / match self { [INFO] [stdout] 1064 | | &Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1065 | | let bits = a.to_bits(); [INFO] [stdout] 1066 | | let res_bits = bits >> shift_usize; [INFO] [stdout] ... | [INFO] [stdout] 1079 | | _ => Err(crate::math::ERR_UNIMPLEMENTED), [INFO] [stdout] 1080 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 1063 ~ match *self { [INFO] [stdout] 1064 ~ Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1065 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1068 | } [INFO] [stdout] 1069 ~ Float::Small(crate::foundation::SmallFloat::F64(a)) => { [INFO] [stdout] 1070 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1073 | } [INFO] [stdout] 1074 ~ Float::Big(ref a) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:1074:13 [INFO] [stdout] | [INFO] [stdout] 1074 | &Float::Big(ref a) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1074 - &Float::Big(ref a) => { [INFO] [stdout] 1074 + Float::Big(a) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> core/ops.rs:1084:9 [INFO] [stdout] | [INFO] [stdout] 1084 | / match self { [INFO] [stdout] 1085 | | &Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1086 | | let bits = a.to_bits(); [INFO] [stdout] 1087 | | let res_f32 = f32::from_bits(!bits); [INFO] [stdout] ... | [INFO] [stdout] 1123 | | _ => Float::NaN, [INFO] [stdout] 1124 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 1084 ~ match *self { [INFO] [stdout] 1085 ~ Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1086 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1099 | } [INFO] [stdout] 1100 ~ Float::Small(crate::foundation::SmallFloat::F64(a)) => { [INFO] [stdout] 1101 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1114 | } [INFO] [stdout] 1115 ~ Float::Big(ref a) => { [INFO] [stdout] 1116 | let (a_mant, _) = a.as_bigint_and_exponent(); [INFO] [stdout] ... [INFO] [stdout] 1119 | } [INFO] [stdout] 1120 ~ Float::Infinity => Float::NegInfinity, [INFO] [stdout] 1121 ~ Float::NegInfinity => Float::Infinity, [INFO] [stdout] 1122 ~ Float::NaN => Float::NaN, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:1115:13 [INFO] [stdout] | [INFO] [stdout] 1115 | &Float::Big(ref a) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1115 - &Float::Big(ref a) => { [INFO] [stdout] 1115 + Float::Big(a) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1146:6 [INFO] [stdout] | [INFO] [stdout] 1146 | impl<'a> BitAnd for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1146 - impl<'a> BitAnd for &'a Float { [INFO] [stdout] 1146 + impl BitAnd for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1174:6 [INFO] [stdout] | [INFO] [stdout] 1174 | impl<'a> BitOr for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1174 - impl<'a> BitOr for &'a Float { [INFO] [stdout] 1174 + impl BitOr for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1202:6 [INFO] [stdout] | [INFO] [stdout] 1202 | impl<'a> BitXor for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1202 - impl<'a> BitXor for &'a Float { [INFO] [stdout] 1202 + impl BitXor for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1223:6 [INFO] [stdout] | [INFO] [stdout] 1223 | impl<'a> Not for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1223 - impl<'a> Not for &'a Float { [INFO] [stdout] 1223 + impl Not for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1244:6 [INFO] [stdout] | [INFO] [stdout] 1244 | impl<'a> Shl for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1244 - impl<'a> Shl for &'a Float { [INFO] [stdout] 1244 + impl Shl for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1272:6 [INFO] [stdout] | [INFO] [stdout] 1272 | impl<'a> Shr for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1272 - impl<'a> Shr for &'a Float { [INFO] [stdout] 1272 + impl Shr for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> core/impls.rs:317:12 [INFO] [stdout] | [INFO] [stdout] 317 | if radix < 2 || radix > 36 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(2..=36).contains(&radix)` [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: this `if` statement can be collapsed [INFO] [stdout] --> core/functions.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | / if let Some(lp) = s.find('(') { [INFO] [stdout] 67 | | if s.ends_with(')') { [INFO] [stdout] 68 | | let repeat = &s[lp + 1..s.len() - 1]; [INFO] [stdout] 69 | | let before = &s[..lp]; [INFO] [stdout] ... | [INFO] [stdout] 173 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 66 ~ if let Some(lp) = s.find('(') [INFO] [stdout] 67 ~ && s.ends_with(')') { [INFO] [stdout] 68 | let repeat = &s[lp + 1..s.len() - 1]; [INFO] [stdout] ... [INFO] [stdout] 171 | } [INFO] [stdout] 172 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> core/impls.rs:349:12 [INFO] [stdout] | [INFO] [stdout] 349 | if radix < 2 || radix > 36 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(2..=36).contains(&radix)` [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: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> core/impls.rs:360:5 [INFO] [stdout] | [INFO] [stdout] 360 | / pub fn from_str(value: &str) -> Result { [INFO] [stdout] 361 | | if value.is_empty() { [INFO] [stdout] 362 | | return Err(ERR_INVALID_FORMAT); [INFO] [stdout] ... | [INFO] [stdout] 368 | | Ok(int) [INFO] [stdout] 369 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/functions.rs:129:17 [INFO] [stdout] | [INFO] [stdout] 129 | rem = rem * BigInt::from(10u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rem *= BigInt::from(10u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/impls.rs:401:28 [INFO] [stdout] | [INFO] [stdout] 401 | let neg_imag = Float::Big(BigDecimal::from(0))._sub(imag).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 401 - let neg_imag = Float::Big(BigDecimal::from(0))._sub(imag).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 401 + let neg_imag = Float::Big(BigDecimal::from(0))._sub(imag).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/functions.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | rem = rem % &den_abs; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rem %= &den_abs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:529:9 [INFO] [stdout] | [INFO] [stdout] 529 | / if k1 == FloatKind::Finite && k2 == FloatKind::Finite { [INFO] [stdout] 530 | | if let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 531 | | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] 532 | | crate::compat::float_to_bigdecimal(other), [INFO] [stdout] ... | [INFO] [stdout] 537 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 529 ~ if k1 == FloatKind::Finite && k2 == FloatKind::Finite [INFO] [stdout] 530 ~ && let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 531 | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] ... [INFO] [stdout] 535 | return Ok(Float::Big(res)); [INFO] [stdout] 536 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:596:9 [INFO] [stdout] | [INFO] [stdout] 596 | / if k1 == FloatKind::Finite && k2 == FloatKind::Finite { [INFO] [stdout] 597 | | if let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 598 | | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] 599 | | crate::compat::float_to_bigdecimal(other), [INFO] [stdout] ... | [INFO] [stdout] 604 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 596 ~ if k1 == FloatKind::Finite && k2 == FloatKind::Finite [INFO] [stdout] 597 ~ && let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 598 | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] ... [INFO] [stdout] 602 | return Ok(Float::Big(res)); [INFO] [stdout] 603 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:606:9 [INFO] [stdout] | [INFO] [stdout] 606 | / if k1 == FloatKind::Irrational && k2 == FloatKind::Irrational { [INFO] [stdout] 607 | | if let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 608 | | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] 609 | | crate::compat::float_to_bigdecimal(other), [INFO] [stdout] ... | [INFO] [stdout] 614 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 606 ~ if k1 == FloatKind::Irrational && k2 == FloatKind::Irrational [INFO] [stdout] 607 ~ && let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 608 | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] ... [INFO] [stdout] 612 | return Ok(Float::Irrational(res)); [INFO] [stdout] 613 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:683:9 [INFO] [stdout] | [INFO] [stdout] 683 | / if k1 == FloatKind::Finite && k2 == FloatKind::Finite { [INFO] [stdout] 684 | | if let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 685 | | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] 686 | | crate::compat::float_to_bigdecimal(other), [INFO] [stdout] ... | [INFO] [stdout] 691 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 683 ~ if k1 == FloatKind::Finite && k2 == FloatKind::Finite [INFO] [stdout] 684 ~ && let (Some(a_bd), Some(b_bd)) = ( [INFO] [stdout] 685 | crate::compat::float_to_bigdecimal(self), [INFO] [stdout] ... [INFO] [stdout] 689 | return Ok(Float::Big(res)); [INFO] [stdout] 690 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> core/impls.rs:812:13 [INFO] [stdout] | [INFO] [stdout] 812 | e1 >= 0 || (e1 < 0 && (-(e1) as usize) <= m1.len() && m1.chars().all(|c| c == '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] 812 - e1 >= 0 || (e1 < 0 && (-(e1) as usize) <= m1.len() && m1.chars().all(|c| c == '0')); [INFO] [stdout] 812 + (m1.chars().all(|c| c == '0') || e1 >= 0) && ((-(e1) as usize) <= m1.len() || e1 >= 0); [INFO] [stdout] | [INFO] [stdout] 812 - e1 >= 0 || (e1 < 0 && (-(e1) as usize) <= m1.len() && m1.chars().all(|c| c == '0')); [INFO] [stdout] 812 + e1 >= 0 || (-(e1) as usize) <= m1.len() && m1.chars().all(|c| c == '0'); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> core/impls.rs:814:13 [INFO] [stdout] | [INFO] [stdout] 814 | e2 >= 0 || (e2 < 0 && (-(e2) as usize) <= m2.len() && m2.chars().all(|c| c == '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] help: try [INFO] [stdout] | [INFO] [stdout] 814 - e2 >= 0 || (e2 < 0 && (-(e2) as usize) <= m2.len() && m2.chars().all(|c| c == '0')); [INFO] [stdout] 814 + (m2.chars().all(|c| c == '0') || e2 >= 0) && ((-(e2) as usize) <= m2.len() || e2 >= 0); [INFO] [stdout] | [INFO] [stdout] 814 - e2 >= 0 || (e2 < 0 && (-(e2) as usize) <= m2.len() && m2.chars().all(|c| c == '0')); [INFO] [stdout] 814 + e2 >= 0 || (-(e2) as usize) <= m2.len() && m2.chars().all(|c| c == '0'); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:832:17 [INFO] [stdout] | [INFO] [stdout] 832 | num = num / &g; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `num /= &g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:833:17 [INFO] [stdout] | [INFO] [stdout] 833 | den = den / &g; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `den /= &g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:837:17 [INFO] [stdout] | [INFO] [stdout] 837 | d = d / BigInt::from(2u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `d /= BigInt::from(2u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:840:17 [INFO] [stdout] | [INFO] [stdout] 840 | d = d / BigInt::from(5u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `d /= BigInt::from(5u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:853:17 [INFO] [stdout] | [INFO] [stdout] 853 | rem = rem * BigInt::from(10u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rem *= BigInt::from(10u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:856:17 [INFO] [stdout] | [INFO] [stdout] 856 | rem = rem % &den_abs; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rem %= &den_abs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> core/impls.rs:962:66 [INFO] [stdout] | [INFO] [stdout] 962 | let (num, den) = crate::math::bigdecimal_to_fraction(&exp_bd); [INFO] [stdout] | ^^^^^^^ help: change this to: `exp_bd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:963:13 [INFO] [stdout] | [INFO] [stdout] 963 | / if den != num_bigint::BigInt::from(1u32) { [INFO] [stdout] 964 | | if let Some(den_u64) = den.to_u64() { [INFO] [stdout] 965 | | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 966 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] ... | [INFO] [stdout] 973 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 963 ~ if den != num_bigint::BigInt::from(1u32) [INFO] [stdout] 964 ~ && let Some(den_u64) = den.to_u64() { [INFO] [stdout] 965 | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] ... [INFO] [stdout] 971 | } [INFO] [stdout] 972 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:964:17 [INFO] [stdout] | [INFO] [stdout] 964 | / if let Some(den_u64) = den.to_u64() { [INFO] [stdout] 965 | | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 966 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 967 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] ... | [INFO] [stdout] 972 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 964 ~ if let Some(den_u64) = den.to_u64() [INFO] [stdout] 965 ~ && den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 966 | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] ... [INFO] [stdout] 970 | } [INFO] [stdout] 971 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:965:21 [INFO] [stdout] | [INFO] [stdout] 965 | / if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 966 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 967 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 968 | | return Ok(Float::Big(res_bd)); [INFO] [stdout] ... | [INFO] [stdout] 971 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 965 ~ if den_u64 > 0 && den_u64 <= 200 [INFO] [stdout] 966 ~ && let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 967 | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 968 | return Ok(Float::Big(res_bd)); [INFO] [stdout] 969 | } [INFO] [stdout] 970 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:966:25 [INFO] [stdout] | [INFO] [stdout] 966 | / if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 967 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 968 | | return Ok(Float::Big(res_bd)); [INFO] [stdout] 969 | | } [INFO] [stdout] 970 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 966 ~ if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) [INFO] [stdout] 967 ~ && let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 968 | return Ok(Float::Big(res_bd)); [INFO] [stdout] 969 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:975:13 [INFO] [stdout] | [INFO] [stdout] 975 | / if let Some(exp_f64) = exp_bd.to_f64() { [INFO] [stdout] 976 | | if let Some((p_u64, q_u64)) = approx_rational_from_f64(exp_f64, 200) { [INFO] [stdout] 977 | | if q_u64 > 0 && q_u64 <= 200 { [INFO] [stdout] 978 | | if p_u64 == 0 { [INFO] [stdout] ... | [INFO] [stdout] 990 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 975 ~ if let Some(exp_f64) = exp_bd.to_f64() [INFO] [stdout] 976 ~ && let Some((p_u64, q_u64)) = approx_rational_from_f64(exp_f64, 200) { [INFO] [stdout] 977 | if q_u64 > 0 && q_u64 <= 200 { [INFO] [stdout] ... [INFO] [stdout] 988 | } [INFO] [stdout] 989 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:976:17 [INFO] [stdout] | [INFO] [stdout] 976 | / if let Some((p_u64, q_u64)) = approx_rational_from_f64(exp_f64, 200) { [INFO] [stdout] 977 | | if q_u64 > 0 && q_u64 <= 200 { [INFO] [stdout] 978 | | if p_u64 == 0 { [INFO] [stdout] 979 | | return Ok(make_float_from_parts("1".to_string(), 0, false, FloatKind::Finite)); [INFO] [stdout] ... | [INFO] [stdout] 989 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 976 ~ if let Some((p_u64, q_u64)) = approx_rational_from_f64(exp_f64, 200) [INFO] [stdout] 977 ~ && q_u64 > 0 && q_u64 <= 200 { [INFO] [stdout] 978 | if p_u64 == 0 { [INFO] [stdout] ... [INFO] [stdout] 987 | } [INFO] [stdout] 988 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/impls.rs:983:49 [INFO] [stdout] | [INFO] [stdout] 983 | ... for _ in 0..p_u64 { pow_bd = pow_bd * base_bd.clone(); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pow_bd *= base_bd.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:993:9 [INFO] [stdout] | [INFO] [stdout] 993 | / if exponent.is_integer_like() { [INFO] [stdout] 994 | | if let Some(exp_bd) = crate::compat::float_to_bigdecimal(exponent) { [INFO] [stdout] 995 | | let (mant, exp_i32, neg) = crate::math::from_bigdecimal(&exp_bd); [INFO] [stdout] 996 | | let mut digits = mant; [INFO] [stdout] ... | [INFO] [stdout] 1015 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 993 ~ if exponent.is_integer_like() [INFO] [stdout] 994 ~ && let Some(exp_bd) = crate::compat::float_to_bigdecimal(exponent) { [INFO] [stdout] 995 | let (mant, exp_i32, neg) = crate::math::from_bigdecimal(&exp_bd); [INFO] [stdout] ... [INFO] [stdout] 1013 | } [INFO] [stdout] 1014 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> core/impls.rs:1004:17 [INFO] [stdout] | [INFO] [stdout] 1004 | / match BigInt::from_str(&digits) { [INFO] [stdout] 1005 | | Ok(mut bi) => { [INFO] [stdout] 1006 | | if neg { bi = -bi; } [INFO] [stdout] 1007 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] ... | [INFO] [stdout] 1012 | | Err(_) => {} [INFO] [stdout] 1013 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1004 ~ if let Ok(mut bi) = BigInt::from_str(&digits) { [INFO] [stdout] 1005 + if neg { bi = -bi; } [INFO] [stdout] 1006 + if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 1007 + let res_bd = bigdecimal_pow_integer(base_bd.clone(), bi); [INFO] [stdout] 1008 + return Ok(Float::Big(res_bd)); [INFO] [stdout] 1009 + } [INFO] [stdout] 1010 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:1019:13 [INFO] [stdout] | [INFO] [stdout] 1019 | / if den != num_bigint::BigInt::from(1u32) { [INFO] [stdout] 1020 | | if let Some(den_u64) = den.to_u64() { [INFO] [stdout] 1021 | | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 1022 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] ... | [INFO] [stdout] 1029 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1019 ~ if den != num_bigint::BigInt::from(1u32) [INFO] [stdout] 1020 ~ && let Some(den_u64) = den.to_u64() { [INFO] [stdout] 1021 | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] ... [INFO] [stdout] 1027 | } [INFO] [stdout] 1028 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:1020:17 [INFO] [stdout] | [INFO] [stdout] 1020 | / if let Some(den_u64) = den.to_u64() { [INFO] [stdout] 1021 | | if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 1022 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 1023 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] ... | [INFO] [stdout] 1028 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1020 ~ if let Some(den_u64) = den.to_u64() [INFO] [stdout] 1021 ~ && den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 1022 | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] ... [INFO] [stdout] 1026 | } [INFO] [stdout] 1027 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:1021:21 [INFO] [stdout] | [INFO] [stdout] 1021 | / if den_u64 > 0 && den_u64 <= 200 { [INFO] [stdout] 1022 | | if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 1023 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 1024 | | return Ok(Float::Big(res_bd)); [INFO] [stdout] ... | [INFO] [stdout] 1027 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1021 ~ if den_u64 > 0 && den_u64 <= 200 [INFO] [stdout] 1022 ~ && let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 1023 | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 1024 | return Ok(Float::Big(res_bd)); [INFO] [stdout] 1025 | } [INFO] [stdout] 1026 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:1022:25 [INFO] [stdout] | [INFO] [stdout] 1022 | / if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) { [INFO] [stdout] 1023 | | if let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 1024 | | return Ok(Float::Big(res_bd)); [INFO] [stdout] 1025 | | } [INFO] [stdout] 1026 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1022 ~ if let Some(base_bd) = crate::compat::float_to_bigdecimal(self) [INFO] [stdout] 1023 ~ && let Ok((res_bd, _exact)) = crate::math::pow_bigdecimal_rational(&base_bd, &num, &den, 137) { [INFO] [stdout] 1024 | return Ok(Float::Big(res_bd)); [INFO] [stdout] 1025 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> core/impls.rs:1088:9 [INFO] [stdout] | [INFO] [stdout] 1088 | / self._pow(exponent).or_else(|_| { [INFO] [stdout] 1089 | | if float_kind(self) == FloatKind::NaN || float_kind(exponent) == FloatKind::NaN { [INFO] [stdout] 1090 | | Err(ERR_INVALID_FORMAT) [INFO] [stdout] 1091 | | } else if float_kind(self) == FloatKind::Infinity [INFO] [stdout] ... | [INFO] [stdout] 1098 | | }) [INFO] [stdout] | |__________^ [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] help: use `map_err` instead [INFO] [stdout] | [INFO] [stdout] 1088 ~ self._pow(exponent).map_err(|_| { [INFO] [stdout] 1089 | if float_kind(self) == FloatKind::NaN || float_kind(exponent) == FloatKind::NaN { [INFO] [stdout] 1090 ~ ERR_INVALID_FORMAT [INFO] [stdout] 1091 | } else if float_kind(self) == FloatKind::Infinity [INFO] [stdout] 1092 | || float_kind(self) == FloatKind::NegInfinity [INFO] [stdout] 1093 | { [INFO] [stdout] 1094 ~ ERR_INFINITE_RESULT [INFO] [stdout] 1095 | } else { [INFO] [stdout] 1096 ~ ERR_UNIMPLEMENTED [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/impls.rs:1103:24 [INFO] [stdout] | [INFO] [stdout] 1103 | let a_sq = real._mul(real).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 1103 - let a_sq = real._mul(real).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 1103 + let a_sq = real._mul(real).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/impls.rs:1104:24 [INFO] [stdout] | [INFO] [stdout] 1104 | let b_sq = imag._mul(imag).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 1104 - let b_sq = imag._mul(imag).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 1104 + let b_sq = imag._mul(imag).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/impls.rs:1105:23 [INFO] [stdout] | [INFO] [stdout] 1105 | let sum = a_sq._add(&b_sq).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 1105 - let sum = a_sq._add(&b_sq).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 1105 + let sum = a_sq._add(&b_sq).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> core/impls.rs:1442:5 [INFO] [stdout] | [INFO] [stdout] 1442 | / pub fn from_str(value: &str) -> Result { [INFO] [stdout] 1443 | | if value.is_empty() { [INFO] [stdout] 1444 | | return Err(ERR_INVALID_FORMAT); [INFO] [stdout] ... | [INFO] [stdout] 1451 | | Ok(float) [INFO] [stdout] 1452 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> core/impls.rs:1459:32 [INFO] [stdout] | [INFO] [stdout] 1459 | if (mant.is_empty() && !(exp >= 0)) || !mant.chars().all(|c| c.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `(exp < 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> core/impls.rs:1459:70 [INFO] [stdout] | [INFO] [stdout] 1459 | if (mant.is_empty() && !(exp >= 0)) || !mant.chars().all(|c| c.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:1526:9 [INFO] [stdout] | [INFO] [stdout] 1526 | / if k == FloatKind::Recurring { [INFO] [stdout] 1527 | | if let Float::Recurring(ref bd) = *self { [INFO] [stdout] 1528 | | let n = bd.normalized(); [INFO] [stdout] 1529 | | let int_candidate = n.with_scale(0); [INFO] [stdout] ... | [INFO] [stdout] 1561 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1526 ~ if k == FloatKind::Recurring [INFO] [stdout] 1527 ~ && let Float::Recurring(ref bd) = *self { [INFO] [stdout] 1528 | let n = bd.normalized(); [INFO] [stdout] ... [INFO] [stdout] 1559 | } [INFO] [stdout] 1560 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/impls.rs:2036:9 [INFO] [stdout] | [INFO] [stdout] 2036 | / if self.is_complex() && n.is_complex() { [INFO] [stdout] 2037 | | if let (Float::Complex(r1, i1), Float::Complex(r2, i2)) = (self, n) { [INFO] [stdout] 2038 | | return r1.approx_eq(r2, epsilon) && i1.approx_eq(i2, epsilon); [INFO] [stdout] 2039 | | } [INFO] [stdout] 2040 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2036 ~ if self.is_complex() && n.is_complex() [INFO] [stdout] 2037 ~ && let (Float::Complex(r1, i1), Float::Complex(r2, i2)) = (self, n) { [INFO] [stdout] 2038 | return r1.approx_eq(r2, epsilon) && i1.approx_eq(i2, epsilon); [INFO] [stdout] 2039 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> core/math.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / s.chars() [INFO] [stdout] 39 | | .rev() [INFO] [stdout] 40 | | .next() [INFO] [stdout] 41 | | .map_or(false, |c| c.to_digit(10).unwrap_or(0) % 2 == 1) [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 41 - .map_or(false, |c| c.to_digit(10).unwrap_or(0) % 2 == 1) [INFO] [stdout] 41 + .is_some_and(|c| c.to_digit(10).unwrap_or(0) % 2 == 1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual backwards iteration [INFO] [stdout] --> core/math.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | s.chars() [INFO] [stdout] | ______________^ [INFO] [stdout] 39 | | .rev() [INFO] [stdout] 40 | | .next() [INFO] [stdout] | |_______________^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] = note: `#[warn(clippy::manual_next_back)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | e = e >> 1u32; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `e >>= 1u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> core/math.rs:122:11 [INFO] [stdout] | [INFO] [stdout] 122 | while &low < &high { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 122 - while &low < &high { [INFO] [stdout] 122 + while low < high { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:239:13 [INFO] [stdout] | [INFO] [stdout] 239 | result = result * base.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result *= base.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:241:9 [INFO] [stdout] | [INFO] [stdout] 241 | e = e >> 1u32; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `e >>= 1u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> core/math.rs:247:22 [INFO] [stdout] | [INFO] [stdout] 247 | if result == BigDecimal::from(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> core/math.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | if a.is_negative() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `a.is_negative();` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:286:13 [INFO] [stdout] | [INFO] [stdout] 286 | x_pow = x_pow * x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x_pow *= x.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:314:9 [INFO] [stdout] | [INFO] [stdout] 314 | x_pow_n = x_pow_n * x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x_pow_n *= x.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:349:9 [INFO] [stdout] | [INFO] [stdout] 349 | base_pow = base_pow * base.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base_pow *= base.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/math.rs:350:9 [INFO] [stdout] | [INFO] [stdout] 350 | n = n - BigInt::from(1u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n -= BigInt::from(1u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> core/math.rs:447:70 [INFO] [stdout] | [INFO] [stdout] 447 | let bd = BigDecimal::new(scaled_num / denom_for_decimal, scale as i64); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `scale` [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: redundant closure [INFO] [stdout] --> core/math.rs:501:57 [INFO] [stdout] | [INFO] [stdout] 501 | let bd = BigDecimal::from_f64(v).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:516:58 [INFO] [stdout] | [INFO] [stdout] 516 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:535:58 [INFO] [stdout] | [INFO] [stdout] 535 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:546:58 [INFO] [stdout] | [INFO] [stdout] 546 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:559:58 [INFO] [stdout] | [INFO] [stdout] 559 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:572:58 [INFO] [stdout] | [INFO] [stdout] 572 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:585:58 [INFO] [stdout] | [INFO] [stdout] 585 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:598:58 [INFO] [stdout] | [INFO] [stdout] 598 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:633:58 [INFO] [stdout] | [INFO] [stdout] 633 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:652:58 [INFO] [stdout] | [INFO] [stdout] 652 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:663:58 [INFO] [stdout] | [INFO] [stdout] 663 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:673:58 [INFO] [stdout] | [INFO] [stdout] 673 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:686:58 [INFO] [stdout] | [INFO] [stdout] 686 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> core/math.rs:696:58 [INFO] [stdout] | [INFO] [stdout] 696 | let bdres = BigDecimal::from_f64(res).unwrap_or_else(|| BigDecimal::zero()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BigDecimal::zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:69:6 [INFO] [stdout] | [INFO] [stdout] 69 | impl<'a> Add for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 69 - impl<'a> Add for &'a Int { [INFO] [stdout] 69 + impl Add for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:83:6 [INFO] [stdout] | [INFO] [stdout] 83 | impl<'a> Sub for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 83 - impl<'a> Sub for &'a Int { [INFO] [stdout] 83 + impl Sub for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:97:6 [INFO] [stdout] | [INFO] [stdout] 97 | impl<'a> Mul for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 97 - impl<'a> Mul for &'a Int { [INFO] [stdout] 97 + impl Mul for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:111:6 [INFO] [stdout] | [INFO] [stdout] 111 | impl<'a> Div for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 111 - impl<'a> Div for &'a Int { [INFO] [stdout] 111 + impl Div for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 125 | impl<'a> Rem for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 125 - impl<'a> Rem for &'a Int { [INFO] [stdout] 125 + impl Rem for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:215:17 [INFO] [stdout] | [INFO] [stdout] 215 | return Some(a.cmp(b)); [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] 215 - return Some(a.cmp(b)); [INFO] [stdout] 215 + Some(a.cmp(b)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:219:17 [INFO] [stdout] | [INFO] [stdout] 219 | return Some(a.cmp(b)); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 219 - return Some(a.cmp(b)); [INFO] [stdout] 219 + Some(a.cmp(b)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:226:17 [INFO] [stdout] | [INFO] [stdout] 226 | return Some(a_big.cmp(&b_big)); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 226 - return Some(a_big.cmp(&b_big)); [INFO] [stdout] 226 + Some(a_big.cmp(&b_big)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:337:6 [INFO] [stdout] | [INFO] [stdout] 337 | impl<'a> Add for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 337 - impl<'a> Add for &'a Float { [INFO] [stdout] 337 + impl Add for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:351:6 [INFO] [stdout] | [INFO] [stdout] 351 | impl<'a> Sub for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 351 - impl<'a> Sub for &'a Float { [INFO] [stdout] 351 + impl Sub for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:365:6 [INFO] [stdout] | [INFO] [stdout] 365 | impl<'a> Mul for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 365 - impl<'a> Mul for &'a Float { [INFO] [stdout] 365 + impl Mul for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:379:6 [INFO] [stdout] | [INFO] [stdout] 379 | impl<'a> Div for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 379 - impl<'a> Div for &'a Float { [INFO] [stdout] 379 + impl Div for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:393:6 [INFO] [stdout] | [INFO] [stdout] 393 | impl<'a> Rem for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 393 - impl<'a> Rem for &'a Float { [INFO] [stdout] 393 + impl Rem for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/ops.rs:411:17 [INFO] [stdout] | [INFO] [stdout] 411 | *self = self._add(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 411 - *self = self._add(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 411 + *self = self._add(&other).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/ops.rs:417:17 [INFO] [stdout] | [INFO] [stdout] 417 | *self = self._sub(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 417 - *self = self._sub(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 417 + *self = self._sub(&other).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/ops.rs:423:17 [INFO] [stdout] | [INFO] [stdout] 423 | *self = self._mul(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 423 - *self = self._mul(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 423 + *self = self._mul(&other).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/ops.rs:429:17 [INFO] [stdout] | [INFO] [stdout] 429 | *self = self._div(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 429 - *self = self._div(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 429 + *self = self._div(&other).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> core/ops.rs:435:17 [INFO] [stdout] | [INFO] [stdout] 435 | *self = self._modulo(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 435 - *self = self._modulo(&other).unwrap_or_else(|_| Float::NaN); [INFO] [stdout] 435 + *self = self._modulo(&other).unwrap_or(Float::NaN); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:446:17 [INFO] [stdout] | [INFO] [stdout] 446 | return Some(a_bd.normalized().cmp(&b_bd.normalized())); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 446 - return Some(a_bd.normalized().cmp(&b_bd.normalized())); [INFO] [stdout] 446 + Some(a_bd.normalized().cmp(&b_bd.normalized())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:458:17 [INFO] [stdout] | [INFO] [stdout] 458 | return a_v.partial_cmp(&b_v); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 458 - return a_v.partial_cmp(&b_v); [INFO] [stdout] 458 + a_v.partial_cmp(&b_v) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:465:17 [INFO] [stdout] | [INFO] [stdout] 465 | return None; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 465 - return None; [INFO] [stdout] 465 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:468:41 [INFO] [stdout] | [INFO] [stdout] 468 | (Float::NaN, Float::NaN) => return Some(Ordering::Equal), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 468 - (Float::NaN, Float::NaN) => return Some(Ordering::Equal), [INFO] [stdout] 468 + (Float::NaN, Float::NaN) => Some(Ordering::Equal), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:469:50 [INFO] [stdout] | [INFO] [stdout] 469 | (Float::NaN, _) | (_, Float::NaN) => return None, [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 469 - (Float::NaN, _) | (_, Float::NaN) => return None, [INFO] [stdout] 469 + (Float::NaN, _) | (_, Float::NaN) => None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:470:51 [INFO] [stdout] | [INFO] [stdout] 470 | (Float::Infinity, Float::Infinity) => return Some(Ordering::Equal), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 470 - (Float::Infinity, Float::Infinity) => return Some(Ordering::Equal), [INFO] [stdout] 470 + (Float::Infinity, Float::Infinity) => Some(Ordering::Equal), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:471:57 [INFO] [stdout] | [INFO] [stdout] 471 | (Float::NegInfinity, Float::NegInfinity) => return Some(Ordering::Equal), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 471 - (Float::NegInfinity, Float::NegInfinity) => return Some(Ordering::Equal), [INFO] [stdout] 471 + (Float::NegInfinity, Float::NegInfinity) => Some(Ordering::Equal), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:472:37 [INFO] [stdout] | [INFO] [stdout] 472 | (Float::Infinity, _) => return Some(Ordering::Greater), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 472 - (Float::Infinity, _) => return Some(Ordering::Greater), [INFO] [stdout] 472 + (Float::Infinity, _) => Some(Ordering::Greater), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:473:37 [INFO] [stdout] | [INFO] [stdout] 473 | (_, Float::Infinity) => return Some(Ordering::Less), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 473 - (_, Float::Infinity) => return Some(Ordering::Less), [INFO] [stdout] 473 + (_, Float::Infinity) => Some(Ordering::Less), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:474:40 [INFO] [stdout] | [INFO] [stdout] 474 | (Float::NegInfinity, _) => return Some(Ordering::Less), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 474 - (Float::NegInfinity, _) => return Some(Ordering::Less), [INFO] [stdout] 474 + (Float::NegInfinity, _) => Some(Ordering::Less), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:475:40 [INFO] [stdout] | [INFO] [stdout] 475 | (_, Float::NegInfinity) => return Some(Ordering::Greater), [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 475 - (_, Float::NegInfinity) => return Some(Ordering::Greater), [INFO] [stdout] 475 + (_, Float::NegInfinity) => Some(Ordering::Greater), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> core/ops.rs:481:17 [INFO] [stdout] | [INFO] [stdout] 481 | return None; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 481 - return None; [INFO] [stdout] 481 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/ops.rs:540:9 [INFO] [stdout] | [INFO] [stdout] 540 | / if k == FloatKind::Recurring { [INFO] [stdout] 541 | | if let Float::Recurring(ref bd) = *self { [INFO] [stdout] 542 | | let s = bd.normalized().to_string(); [INFO] [stdout] 543 | | let parts: Vec<&str> = s.split('E').collect(); [INFO] [stdout] ... | [INFO] [stdout] 627 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 540 ~ if k == FloatKind::Recurring [INFO] [stdout] 541 ~ && let Float::Recurring(ref bd) = *self { [INFO] [stdout] 542 | let s = bd.normalized().to_string(); [INFO] [stdout] ... [INFO] [stdout] 625 | } [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> core/ops.rs:602:32 [INFO] [stdout] | [INFO] [stdout] 602 | ... if &frac[i..i + take] != &rep[..take] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 602 - if &frac[i..i + take] != &rep[..take] { [INFO] [stdout] 602 + if frac[i..i + take] != rep[..take] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> core/ops.rs:634:42 [INFO] [stdout] | [INFO] [stdout] 634 | if k == FloatKind::Irrational || (exp >= -50 && exp <= 50) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-50..=50).contains(&exp)` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:752:6 [INFO] [stdout] | [INFO] [stdout] 752 | impl<'a> BitAnd for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 752 - impl<'a> BitAnd for &'a Int { [INFO] [stdout] 752 + impl BitAnd for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:780:6 [INFO] [stdout] | [INFO] [stdout] 780 | impl<'a> BitOr for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 780 - impl<'a> BitOr for &'a Int { [INFO] [stdout] 780 + impl BitOr for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:808:6 [INFO] [stdout] | [INFO] [stdout] 808 | impl<'a> BitXor for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 808 - impl<'a> BitXor for &'a Int { [INFO] [stdout] 808 + impl BitXor for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:829:6 [INFO] [stdout] | [INFO] [stdout] 829 | impl<'a> Not for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 829 - impl<'a> Not for &'a Int { [INFO] [stdout] 829 + impl Not for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:850:6 [INFO] [stdout] | [INFO] [stdout] 850 | impl<'a> Shl for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 850 - impl<'a> Shl for &'a Int { [INFO] [stdout] 850 + impl Shl for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:878:6 [INFO] [stdout] | [INFO] [stdout] 878 | impl<'a> Shr for &'a Int { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 878 - impl<'a> Shr for &'a Int { [INFO] [stdout] 878 + impl Shr for &Int { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:908:14 [INFO] [stdout] | [INFO] [stdout] 908 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 908 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 908 + (Float::Big(a), &Float::Big(ref b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:908:34 [INFO] [stdout] | [INFO] [stdout] 908 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 908 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 908 + (&Float::Big(ref a), Float::Big(b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:955:14 [INFO] [stdout] | [INFO] [stdout] 955 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 955 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 955 + (Float::Big(a), &Float::Big(ref b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:955:34 [INFO] [stdout] | [INFO] [stdout] 955 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 955 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 955 + (&Float::Big(ref a), Float::Big(b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:1002:14 [INFO] [stdout] | [INFO] [stdout] 1002 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1002 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 1002 + (Float::Big(a), &Float::Big(ref b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:1002:34 [INFO] [stdout] | [INFO] [stdout] 1002 | (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1002 - (&Float::Big(ref a), &Float::Big(ref b)) => { [INFO] [stdout] 1002 + (&Float::Big(ref a), Float::Big(b)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> core/ops.rs:1030:9 [INFO] [stdout] | [INFO] [stdout] 1030 | / match self { [INFO] [stdout] 1031 | | &Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1032 | | let bits = a.to_bits(); [INFO] [stdout] 1033 | | let res_bits = bits << shift_usize; [INFO] [stdout] ... | [INFO] [stdout] 1046 | | _ => Err(crate::math::ERR_UNIMPLEMENTED), [INFO] [stdout] 1047 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 1030 ~ match *self { [INFO] [stdout] 1031 ~ Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1032 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1035 | } [INFO] [stdout] 1036 ~ Float::Small(crate::foundation::SmallFloat::F64(a)) => { [INFO] [stdout] 1037 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1040 | } [INFO] [stdout] 1041 ~ Float::Big(ref a) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:1041:13 [INFO] [stdout] | [INFO] [stdout] 1041 | &Float::Big(ref a) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1041 - &Float::Big(ref a) => { [INFO] [stdout] 1041 + Float::Big(a) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> core/ops.rs:1063:9 [INFO] [stdout] | [INFO] [stdout] 1063 | / match self { [INFO] [stdout] 1064 | | &Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1065 | | let bits = a.to_bits(); [INFO] [stdout] 1066 | | let res_bits = bits >> shift_usize; [INFO] [stdout] ... | [INFO] [stdout] 1079 | | _ => Err(crate::math::ERR_UNIMPLEMENTED), [INFO] [stdout] 1080 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 1063 ~ match *self { [INFO] [stdout] 1064 ~ Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1065 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1068 | } [INFO] [stdout] 1069 ~ Float::Small(crate::foundation::SmallFloat::F64(a)) => { [INFO] [stdout] 1070 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1073 | } [INFO] [stdout] 1074 ~ Float::Big(ref a) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:1074:13 [INFO] [stdout] | [INFO] [stdout] 1074 | &Float::Big(ref a) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1074 - &Float::Big(ref a) => { [INFO] [stdout] 1074 + Float::Big(a) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> core/ops.rs:1084:9 [INFO] [stdout] | [INFO] [stdout] 1084 | / match self { [INFO] [stdout] 1085 | | &Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1086 | | let bits = a.to_bits(); [INFO] [stdout] 1087 | | let res_f32 = f32::from_bits(!bits); [INFO] [stdout] ... | [INFO] [stdout] 1123 | | _ => Float::NaN, [INFO] [stdout] 1124 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 1084 ~ match *self { [INFO] [stdout] 1085 ~ Float::Small(crate::foundation::SmallFloat::F32(a)) => { [INFO] [stdout] 1086 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1099 | } [INFO] [stdout] 1100 ~ Float::Small(crate::foundation::SmallFloat::F64(a)) => { [INFO] [stdout] 1101 | let bits = a.to_bits(); [INFO] [stdout] ... [INFO] [stdout] 1114 | } [INFO] [stdout] 1115 ~ Float::Big(ref a) => { [INFO] [stdout] 1116 | let (a_mant, _) = a.as_bigint_and_exponent(); [INFO] [stdout] ... [INFO] [stdout] 1119 | } [INFO] [stdout] 1120 ~ Float::Infinity => Float::NegInfinity, [INFO] [stdout] 1121 ~ Float::NegInfinity => Float::Infinity, [INFO] [stdout] 1122 ~ Float::NaN => Float::NaN, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> core/ops.rs:1115:13 [INFO] [stdout] | [INFO] [stdout] 1115 | &Float::Big(ref a) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1115 - &Float::Big(ref a) => { [INFO] [stdout] 1115 + Float::Big(a) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1146:6 [INFO] [stdout] | [INFO] [stdout] 1146 | impl<'a> BitAnd for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1146 - impl<'a> BitAnd for &'a Float { [INFO] [stdout] 1146 + impl BitAnd for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1174:6 [INFO] [stdout] | [INFO] [stdout] 1174 | impl<'a> BitOr for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1174 - impl<'a> BitOr for &'a Float { [INFO] [stdout] 1174 + impl BitOr for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1202:6 [INFO] [stdout] | [INFO] [stdout] 1202 | impl<'a> BitXor for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1202 - impl<'a> BitXor for &'a Float { [INFO] [stdout] 1202 + impl BitXor for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1223:6 [INFO] [stdout] | [INFO] [stdout] 1223 | impl<'a> Not for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1223 - impl<'a> Not for &'a Float { [INFO] [stdout] 1223 + impl Not for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1244:6 [INFO] [stdout] | [INFO] [stdout] 1244 | impl<'a> Shl for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1244 - impl<'a> Shl for &'a Float { [INFO] [stdout] 1244 + impl Shl for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> core/ops.rs:1272:6 [INFO] [stdout] | [INFO] [stdout] 1272 | impl<'a> Shr for &'a Float { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1272 - impl<'a> Shr for &'a Float { [INFO] [stdout] 1272 + impl Shr for &Float { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> core/functions.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | / if let Some(lp) = s.find('(') { [INFO] [stdout] 67 | | if s.ends_with(')') { [INFO] [stdout] 68 | | let repeat = &s[lp + 1..s.len() - 1]; [INFO] [stdout] 69 | | let before = &s[..lp]; [INFO] [stdout] ... | [INFO] [stdout] 173 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 66 ~ if let Some(lp) = s.find('(') [INFO] [stdout] 67 ~ && s.ends_with(')') { [INFO] [stdout] 68 | let repeat = &s[lp + 1..s.len() - 1]; [INFO] [stdout] ... [INFO] [stdout] 171 | } [INFO] [stdout] 172 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/functions.rs:129:17 [INFO] [stdout] | [INFO] [stdout] 129 | rem = rem * BigInt::from(10u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rem *= BigInt::from(10u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> core/functions.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | rem = rem % &den_abs; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rem %= &den_abs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> tests/overflow.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | let a = create_float(&format!("{}", "1".to_string() + &"0".repeat(400))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"1".to_string() + &"0".repeat(400)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> tests/overflow.rs:42:27 [INFO] [stdout] | [INFO] [stdout] 42 | let b = create_float(&format!("{}", "9".repeat(200))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"9".repeat(200).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/overflow.rs:47:21 [INFO] [stdout] | [INFO] [stdout] 47 | assert!(s.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> tests/approx_eq.rs:49:26 [INFO] [stdout] | [INFO] [stdout] 49 | assert!(!a.approx_eq(&Float::NAN, 1.0)); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::borrow_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> tests/approx_eq.rs:50:14 [INFO] [stdout] | [INFO] [stdout] 50 | assert!(!Float::NAN.approx_eq(&Float::NAN, 1.0)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> tests/approx_eq.rs:50:35 [INFO] [stdout] | [INFO] [stdout] 50 | assert!(!Float::NAN.approx_eq(&Float::NAN, 1.0)); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> tests/approx_eq.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | assert!(Float::INFINITY.approx_eq(&Float::INFINITY, 1.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> tests/approx_eq.rs:57:39 [INFO] [stdout] | [INFO] [stdout] 57 | assert!(Float::INFINITY.approx_eq(&Float::INFINITY, 1.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> tests/approx_eq.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | assert!(Float::NEG_INFINITY.approx_eq(&Float::NEG_INFINITY, 1.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> tests/approx_eq.rs:58:43 [INFO] [stdout] | [INFO] [stdout] 58 | assert!(Float::NEG_INFINITY.approx_eq(&Float::NEG_INFINITY, 1.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> tests/approx_eq.rs:59:14 [INFO] [stdout] | [INFO] [stdout] 59 | assert!(!Float::INFINITY.approx_eq(&Float::NEG_INFINITY, 1.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> tests/approx_eq.rs:59:40 [INFO] [stdout] | [INFO] [stdout] 59 | assert!(!Float::INFINITY.approx_eq(&Float::NEG_INFINITY, 1.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> tests/approx_eq.rs:60:26 [INFO] [stdout] | [INFO] [stdout] 60 | assert!(!a.approx_eq(&Float::INFINITY, 1.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `assert_eq!` args [INFO] [stdout] --> tests/from_hex.rs:15:51 [INFO] [stdout] | [INFO] [stdout] 15 | assert_eq!(i.to_str(), format!("-{}", expected.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> tests/all_features.rs:198:39 [INFO] [stdout] | [INFO] [stdout] 198 | assert_eq!(inf.to_f64().unwrap(), std::f64::INFINITY); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 198 - assert_eq!(inf.to_f64().unwrap(), std::f64::INFINITY); [INFO] [stdout] 198 + assert_eq!(inf.to_f64().unwrap(), f64::INFINITY); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> tests/all_features.rs:200:40 [INFO] [stdout] | [INFO] [stdout] 200 | assert_eq!(ninf.to_f64().unwrap(), std::f64::NEG_INFINITY); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 200 - assert_eq!(ninf.to_f64().unwrap(), std::f64::NEG_INFINITY); [INFO] [stdout] 200 + assert_eq!(ninf.to_f64().unwrap(), f64::NEG_INFINITY); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> imagnum-cli.rs:365:17 [INFO] [stdout] | [INFO] [stdout] 365 | / if let Some(eq_pos) = line.find('=') { [INFO] [stdout] 366 | | if eq_pos > 0 { [INFO] [stdout] 367 | | let var_name = line[..eq_pos].trim(); [INFO] [stdout] 368 | | let expr = line[eq_pos + 1..].trim(); [INFO] [stdout] ... | [INFO] [stdout] 383 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 365 ~ if let Some(eq_pos) = line.find('=') [INFO] [stdout] 366 ~ && eq_pos > 0 { [INFO] [stdout] 367 | let var_name = line[..eq_pos].trim(); [INFO] [stdout] ... [INFO] [stdout] 381 | } [INFO] [stdout] 382 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> imagnum-cli.rs:365:17 [INFO] [stdout] | [INFO] [stdout] 365 | / if let Some(eq_pos) = line.find('=') { [INFO] [stdout] 366 | | if eq_pos > 0 { [INFO] [stdout] 367 | | let var_name = line[..eq_pos].trim(); [INFO] [stdout] 368 | | let expr = line[eq_pos + 1..].trim(); [INFO] [stdout] ... | [INFO] [stdout] 383 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 365 ~ if let Some(eq_pos) = line.find('=') [INFO] [stdout] 366 ~ && eq_pos > 0 { [INFO] [stdout] 367 | let var_name = line[..eq_pos].trim(); [INFO] [stdout] ... [INFO] [stdout] 381 | } [INFO] [stdout] 382 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> imagnum-cli.rs:720:21 [INFO] [stdout] | [INFO] [stdout] 720 | if let Some(d) = decimals.to_string().parse::().ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok(d)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 720 - if let Some(d) = decimals.to_string().parse::().ok() { [INFO] [stdout] 720 + if let Ok(d) = decimals.to_string().parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> imagnum-cli.rs:733:21 [INFO] [stdout] | [INFO] [stdout] 733 | if let Some(d) = decimals.to_string().parse::().ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] help: consider matching on `Ok(d)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 733 - if let Some(d) = decimals.to_string().parse::().ok() { [INFO] [stdout] 733 + if let Ok(d) = decimals.to_string().parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> imagnum-cli.rs:720:21 [INFO] [stdout] | [INFO] [stdout] 720 | if let Some(d) = decimals.to_string().parse::().ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok(d)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 720 - if let Some(d) = decimals.to_string().parse::().ok() { [INFO] [stdout] 720 + if let Ok(d) = decimals.to_string().parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> imagnum-cli.rs:733:21 [INFO] [stdout] | [INFO] [stdout] 733 | if let Some(d) = decimals.to_string().parse::().ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] help: consider matching on `Ok(d)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 733 - if let Some(d) = decimals.to_string().parse::().ok() { [INFO] [stdout] 733 + if let Ok(d) = decimals.to_string().parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> imagnum-cli.rs:895:21 [INFO] [stdout] | [INFO] [stdout] 895 | / let cmp_result = match (lhs.promote()?, rhs.promote()?) { [INFO] [stdout] 896 | | (a, b) => match op { [INFO] [stdout] 897 | | "==" => a == b, [INFO] [stdout] 898 | | "!=" => a != b, [INFO] [stdout] ... | [INFO] [stdout] 904 | | }, [INFO] [stdout] 905 | | }; [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 895 ~ let (a, b) = (lhs.promote()?, rhs.promote()?); [INFO] [stdout] 896 + let cmp_result = match op { [INFO] [stdout] 897 + "==" => a == b, [INFO] [stdout] 898 + "!=" => a != b, [INFO] [stdout] 899 + ">" => a > b, [INFO] [stdout] 900 + "<" => a < b, [INFO] [stdout] 901 + ">=" => a >= b, [INFO] [stdout] 902 + "<=" => a <= b, [INFO] [stdout] 903 + _ => false, [INFO] [stdout] 904 + }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> imagnum-cli.rs:895:21 [INFO] [stdout] | [INFO] [stdout] 895 | / let cmp_result = match (lhs.promote()?, rhs.promote()?) { [INFO] [stdout] 896 | | (a, b) => match op { [INFO] [stdout] 897 | | "==" => a == b, [INFO] [stdout] 898 | | "!=" => a != b, [INFO] [stdout] ... | [INFO] [stdout] 904 | | }, [INFO] [stdout] 905 | | }; [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 895 ~ let (a, b) = (lhs.promote()?, rhs.promote()?); [INFO] [stdout] 896 + let cmp_result = match op { [INFO] [stdout] 897 + "==" => a == b, [INFO] [stdout] 898 + "!=" => a != b, [INFO] [stdout] 899 + ">" => a > b, [INFO] [stdout] 900 + "<" => a < b, [INFO] [stdout] 901 + ">=" => a >= b, [INFO] [stdout] 902 + "<=" => a <= b, [INFO] [stdout] 903 + _ => false, [INFO] [stdout] 904 + }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.63s [INFO] running `Command { std: "docker" "inspect" "538ad773f59db3c452de2afaaef55ead870f39e3aa4da4d01ad76b26f1cedd51", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "538ad773f59db3c452de2afaaef55ead870f39e3aa4da4d01ad76b26f1cedd51", kill_on_drop: false }` [INFO] [stdout] 538ad773f59db3c452de2afaaef55ead870f39e3aa4da4d01ad76b26f1cedd51