[INFO] fetching crate zfuel 0.6.1... [INFO] linting zfuel-0.6.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate zfuel 0.6.1 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate zfuel 0.6.1 [INFO] finished tweaking crates.io crate zfuel 0.6.1 [INFO] tweaked toml for crates.io crate zfuel 0.6.1 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate zfuel 0.6.1 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate zfuel 0.6.1 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] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded serde-transcode v1.1.1 [INFO] [stderr] Downloaded serde_bytes v0.11.17 [INFO] [stderr] Downloaded holochain_wasmer_common v0.0.101 [INFO] [stderr] Downloaded holochain_serialized_bytes_derive v0.0.56 [INFO] [stderr] Downloaded holochain_serialized_bytes v0.0.56 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] b796a75bc972000dac3ad6ab7aed294b53dc3e8a5697e5667584bb3c93797cd6 [INFO] running `Command { std: "docker" "start" "-a" "b796a75bc972000dac3ad6ab7aed294b53dc3e8a5697e5667584bb3c93797cd6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b796a75bc972000dac3ad6ab7aed294b53dc3e8a5697e5667584bb3c93797cd6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b796a75bc972000dac3ad6ab7aed294b53dc3e8a5697e5667584bb3c93797cd6", kill_on_drop: false }` [INFO] [stdout] b796a75bc972000dac3ad6ab7aed294b53dc3e8a5697e5667584bb3c93797cd6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 3dcd42ad0b05aedb168fce76d5c8ba03200b088cf7c22fe14a4b57de08fe95b7 [INFO] running `Command { std: "docker" "start" "-a" "3dcd42ad0b05aedb168fce76d5c8ba03200b088cf7c22fe14a4b57de08fe95b7", kill_on_drop: false }` [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Checking memchr v2.7.6 [INFO] [stderr] Checking hashbrown v0.16.1 [INFO] [stderr] Checking byteorder v1.5.0 [INFO] [stderr] Checking equivalent v1.0.2 [INFO] [stderr] Compiling serde_json v1.0.143 [INFO] [stderr] Checking itoa v1.0.15 [INFO] [stderr] Checking ryu v1.0.20 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Checking minimal-lexical v0.2.1 [INFO] [stderr] Compiling thiserror v2.0.17 [INFO] [stderr] Checking lazy_static v1.5.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling syn v2.0.110 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking indexmap v2.12.0 [INFO] [stderr] Checking rmp v0.8.14 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling holochain_serialized_bytes_derive v0.0.56 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking rmp-serde v1.3.0 [INFO] [stderr] Checking serde-transcode v1.1.1 [INFO] [stderr] Checking serde_bytes v0.11.17 [INFO] [stderr] Checking holochain_serialized_bytes v0.0.56 [INFO] [stderr] Checking holochain_wasmer_common v0.0.101 [INFO] [stderr] Checking zfuel v0.6.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/fuel.rs:85:1 [INFO] [stdout] | [INFO] [stdout] 85 | / /// [INFO] [stdout] 86 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 90 | pub const EXPONENT: usize = 6; // Up to 6 digits after decimal (>6 truncated) [INFO] [stdout] | ------------------ the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document constant item `EXPONENT` then comment it out [INFO] [stdout] | [INFO] [stdout] 25 ~ // /// [INFO] [stdout] 26 ~ // /// Fuel -- Account for z Fuel, in fractions of 1/10^6 ( 1/1,000,000th of a unit) [INFO] [stdout] 27 ~ // /// [INFO] [stdout] 28 ~ // /// Ensures that the integer amount never leaves Rust / Web Assembly. For example, if the i64 value [INFO] [stdout] 29 ~ // /// was processed in Javascript, it must not exceed a +/- value that would fit into an IEEE 754 [INFO] [stdout] 30 ~ // /// double-precision floating point value without loss of precision. Thus, the no value exceeding [INFO] [stdout] 31 ~ // /// +/- 2^53-1 fractional units of z Fuel should be converted into an f64. [INFO] [stdout] 32 ~ // /// [INFO] [stdout] 33 ~ // /// This Fuel struct is what ensures that we do not pass numeric z Fuel amounts through the WASM [INFO] [stdout] 34 ~ // /// boundary. All precise z Fuel values, such as 2,882,343,476 x 1/1e6 units of z Fuel are [INFO] [stdout] 35 ~ // /// represented as Display 'fmt()' values (eg. "2882.343467" z Fuel). The Display value is precisely [INFO] [stdout] 36 ~ // /// convertible back and forth into the internal integer representation without loss of precision, [INFO] [stdout] 37 ~ // /// and is also a human-readable fractional amount of z Fuel, it is also the preferred external [INFO] [stdout] 38 ~ // /// representation. [INFO] [stdout] 39 ~ // /// [INFO] [stdout] 40 ~ // /// Javascript (and other languages that use IEEE 754 floats to represent integer values) cannot be [INFO] [stdout] 41 ~ // /// allowed to compute numeric values that will exceed 2^53-1 (9.0072e15); the capacity of IEEE 754 [INFO] [stdout] 42 ~ // /// mantissa w/o loss of numerical accuracy, for those platforms that emulate i64 using IEEE 754 [INFO] [stdout] 43 ~ // /// double-precision floating point. Allowing 15 total decimal digits in 7 integer and 8 fractional [INFO] [stdout] 44 ~ // /// digits (+/-1e15), and 13 hex digits (+/-4.5e15) is safely within this range. However, we would [INFO] [stdout] 45 ~ // /// give up some possibly useful capacity. [INFO] [stdout] 46 ~ // /// [INFO] [stdout] 47 ~ // /// The available range in [0,2^53), with 8 decimal digits after the decimal point, is about 7.95 [INFO] [stdout] 48 ~ // /// digits: log( 2**53 / 10 ** 8, 10 ) == 7.9545. So, we would allow up to 8 integer digits, and [INFO] [stdout] 49 ~ // /// manually check for precision overflow by comparing against 2**53, and rejecting any value that [INFO] [stdout] 50 ~ // /// exceeds the maximum 9.0071e15). Likewise, we accept 14 hex digits, and check the full precision [INFO] [stdout] 51 ~ // /// limits manually. This would allow only z Fuel account and transaction values up to about [INFO] [stdout] 52 ~ // /// 90,071,992 z Fuel; insufficient (there are 177B HOT issued already, so the Holo [INFO] [stdout] 53 ~ // /// infrastructure account will be in a debit condition beyond this value). [INFO] [stdout] 54 ~ // /// [INFO] [stdout] 55 ~ // /// With 6 decimal digits of fractional precision (a minimum transaction of 1/1,000,000 of a [INFO] [stdout] 56 ~ // /// Fuel), the range is log( 2**53 / 10 ** 6, 10 ) == 9.9545 digits of z Fuel; almost 10 [INFO] [stdout] 57 ~ // /// digits of precision, with a max capacity of about 9,007,199,254 Fuel; still insufficient to [INFO] [stdout] 58 ~ // /// represent the debit balance of the Holo organization which issued the HOT. [INFO] [stdout] 59 ~ // /// [INFO] [stdout] 60 ~ // /// Therefore, we allow the full range of i64 values for Fuel.units -- and disallow/discourage [INFO] [stdout] 61 ~ // /// calculation on Fuel values in Javascript code; unless you use Big values, you *will* (very, very [INFO] [stdout] 62 ~ // /// probably) do it wrong, and lose precision with large Fuel values. [INFO] [stdout] 63 ~ // /// [INFO] [stdout] 64 ~ // /// By allowing the full i64 range for Fuel units (1/10^6 of a Fuel), we achieve a maximum [INFO] [stdout] 65 ~ // /// range of +/- of log( 2**63 / 10 ** 6 ) == 12.96 digits of Fuel capacity; about [INFO] [stdout] 66 ~ // /// 9,223,372,036,854 (9.223 Trillion) Fuel account and transaction value capacity; adequate for [INFO] [stdout] 67 ~ // /// any single Fuel account value or Transaction amount. Any transaction the exceeds these [INFO] [stdout] 68 ~ // /// values will fail to complete (as all calculations are strictly bounds-checked). [INFO] [stdout] 69 ~ // /// [INFO] [stdout] 70 ~ // /// The minimum fractional minimum amount of 1/10^6 Fuel allows for micro-transactions down to [INFO] [stdout] 71 ~ // /// 1/1,000,000th (1 millionth) of a Fuel. Fee payments lose precision below value of [INFO] [stdout] 72 ~ // /// 1/10,000th of a Fuel; for example, if a micro-transaction of 0.000123 Fuel is spent, the [INFO] [stdout] 73 ~ // /// 1% fee that will be computed and charged could be 0.000001 Fuel if rounded down, or 0.000002 [INFO] [stdout] 74 ~ // /// if rounded up. [INFO] [stdout] 75 ~ // /// [INFO] [stdout] 76 ~ // /// Since the system "cost" of extremely tiny transactions is not free, fees on the portion of [INFO] [stdout] 77 ~ // /// transactions below the minimum threshold are always rounded up (away from 0). This doesn't [INFO] [stdout] 78 ~ // /// affect the fee calculation of fees on transactions of precision 0.0001 or above (ie. the fee for [INFO] [stdout] 79 ~ // /// spending .0021 Fuel is exactly 0.000021). However, the fee for spending 0.00213 is computed [INFO] [stdout] 80 ~ // /// as 0.000022 (is round up), instead of 0.000021 (normal rounding). Perhaps surprisingly, the fee [INFO] [stdout] 81 ~ // /// to spend 0.000001 Fuel is 0.000001. In effect, the fees on extremely tiny transactions [INFO] [stdout] 82 ~ // /// increase from 1%, up to 100% fees on the tiniest possible transaction. This better reflects the [INFO] [stdout] 83 ~ // /// actual costs of running the Holo system, and is not an egregious cost; 1,000 such transactions [INFO] [stdout] 84 ~ // /// would cost an additional 0.001 Fuel in fees (vs. fees calculated with infinite precision). [INFO] [stdout] 85 ~ // /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/fuel.rs:685:1 [INFO] [stdout] | [INFO] [stdout] 685 | / /// [INFO] [stdout] 686 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 690 | impl Neg for ZFuel { [INFO] [stdout] | - the comment documents this implementation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 686 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/fuel.rs:85:1 [INFO] [stdout] | [INFO] [stdout] 85 | / /// [INFO] [stdout] 86 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 90 | pub const EXPONENT: usize = 6; // Up to 6 digits after decimal (>6 truncated) [INFO] [stdout] | ------------------ the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document constant item `EXPONENT` then comment it out [INFO] [stdout] | [INFO] [stdout] 25 ~ // /// [INFO] [stdout] 26 ~ // /// Fuel -- Account for z Fuel, in fractions of 1/10^6 ( 1/1,000,000th of a unit) [INFO] [stdout] 27 ~ // /// [INFO] [stdout] 28 ~ // /// Ensures that the integer amount never leaves Rust / Web Assembly. For example, if the i64 value [INFO] [stdout] 29 ~ // /// was processed in Javascript, it must not exceed a +/- value that would fit into an IEEE 754 [INFO] [stdout] 30 ~ // /// double-precision floating point value without loss of precision. Thus, the no value exceeding [INFO] [stdout] 31 ~ // /// +/- 2^53-1 fractional units of z Fuel should be converted into an f64. [INFO] [stdout] 32 ~ // /// [INFO] [stdout] 33 ~ // /// This Fuel struct is what ensures that we do not pass numeric z Fuel amounts through the WASM [INFO] [stdout] 34 ~ // /// boundary. All precise z Fuel values, such as 2,882,343,476 x 1/1e6 units of z Fuel are [INFO] [stdout] 35 ~ // /// represented as Display 'fmt()' values (eg. "2882.343467" z Fuel). The Display value is precisely [INFO] [stdout] 36 ~ // /// convertible back and forth into the internal integer representation without loss of precision, [INFO] [stdout] 37 ~ // /// and is also a human-readable fractional amount of z Fuel, it is also the preferred external [INFO] [stdout] 38 ~ // /// representation. [INFO] [stdout] 39 ~ // /// [INFO] [stdout] 40 ~ // /// Javascript (and other languages that use IEEE 754 floats to represent integer values) cannot be [INFO] [stdout] 41 ~ // /// allowed to compute numeric values that will exceed 2^53-1 (9.0072e15); the capacity of IEEE 754 [INFO] [stdout] 42 ~ // /// mantissa w/o loss of numerical accuracy, for those platforms that emulate i64 using IEEE 754 [INFO] [stdout] 43 ~ // /// double-precision floating point. Allowing 15 total decimal digits in 7 integer and 8 fractional [INFO] [stdout] 44 ~ // /// digits (+/-1e15), and 13 hex digits (+/-4.5e15) is safely within this range. However, we would [INFO] [stdout] 45 ~ // /// give up some possibly useful capacity. [INFO] [stdout] 46 ~ // /// [INFO] [stdout] 47 ~ // /// The available range in [0,2^53), with 8 decimal digits after the decimal point, is about 7.95 [INFO] [stdout] 48 ~ // /// digits: log( 2**53 / 10 ** 8, 10 ) == 7.9545. So, we would allow up to 8 integer digits, and [INFO] [stdout] 49 ~ // /// manually check for precision overflow by comparing against 2**53, and rejecting any value that [INFO] [stdout] 50 ~ // /// exceeds the maximum 9.0071e15). Likewise, we accept 14 hex digits, and check the full precision [INFO] [stdout] 51 ~ // /// limits manually. This would allow only z Fuel account and transaction values up to about [INFO] [stdout] 52 ~ // /// 90,071,992 z Fuel; insufficient (there are 177B HOT issued already, so the Holo [INFO] [stdout] 53 ~ // /// infrastructure account will be in a debit condition beyond this value). [INFO] [stdout] 54 ~ // /// [INFO] [stdout] 55 ~ // /// With 6 decimal digits of fractional precision (a minimum transaction of 1/1,000,000 of a [INFO] [stdout] 56 ~ // /// Fuel), the range is log( 2**53 / 10 ** 6, 10 ) == 9.9545 digits of z Fuel; almost 10 [INFO] [stdout] 57 ~ // /// digits of precision, with a max capacity of about 9,007,199,254 Fuel; still insufficient to [INFO] [stdout] 58 ~ // /// represent the debit balance of the Holo organization which issued the HOT. [INFO] [stdout] 59 ~ // /// [INFO] [stdout] 60 ~ // /// Therefore, we allow the full range of i64 values for Fuel.units -- and disallow/discourage [INFO] [stdout] 61 ~ // /// calculation on Fuel values in Javascript code; unless you use Big values, you *will* (very, very [INFO] [stdout] 62 ~ // /// probably) do it wrong, and lose precision with large Fuel values. [INFO] [stdout] 63 ~ // /// [INFO] [stdout] 64 ~ // /// By allowing the full i64 range for Fuel units (1/10^6 of a Fuel), we achieve a maximum [INFO] [stdout] 65 ~ // /// range of +/- of log( 2**63 / 10 ** 6 ) == 12.96 digits of Fuel capacity; about [INFO] [stdout] 66 ~ // /// 9,223,372,036,854 (9.223 Trillion) Fuel account and transaction value capacity; adequate for [INFO] [stdout] 67 ~ // /// any single Fuel account value or Transaction amount. Any transaction the exceeds these [INFO] [stdout] 68 ~ // /// values will fail to complete (as all calculations are strictly bounds-checked). [INFO] [stdout] 69 ~ // /// [INFO] [stdout] 70 ~ // /// The minimum fractional minimum amount of 1/10^6 Fuel allows for micro-transactions down to [INFO] [stdout] 71 ~ // /// 1/1,000,000th (1 millionth) of a Fuel. Fee payments lose precision below value of [INFO] [stdout] 72 ~ // /// 1/10,000th of a Fuel; for example, if a micro-transaction of 0.000123 Fuel is spent, the [INFO] [stdout] 73 ~ // /// 1% fee that will be computed and charged could be 0.000001 Fuel if rounded down, or 0.000002 [INFO] [stdout] 74 ~ // /// if rounded up. [INFO] [stdout] 75 ~ // /// [INFO] [stdout] 76 ~ // /// Since the system "cost" of extremely tiny transactions is not free, fees on the portion of [INFO] [stdout] 77 ~ // /// transactions below the minimum threshold are always rounded up (away from 0). This doesn't [INFO] [stdout] 78 ~ // /// affect the fee calculation of fees on transactions of precision 0.0001 or above (ie. the fee for [INFO] [stdout] 79 ~ // /// spending .0021 Fuel is exactly 0.000021). However, the fee for spending 0.00213 is computed [INFO] [stdout] 80 ~ // /// as 0.000022 (is round up), instead of 0.000021 (normal rounding). Perhaps surprisingly, the fee [INFO] [stdout] 81 ~ // /// to spend 0.000001 Fuel is 0.000001. In effect, the fees on extremely tiny transactions [INFO] [stdout] 82 ~ // /// increase from 1%, up to 100% fees on the tiniest possible transaction. This better reflects the [INFO] [stdout] 83 ~ // /// actual costs of running the Holo system, and is not an egregious cost; 1,000 such transactions [INFO] [stdout] 84 ~ // /// would cost an additional 0.001 Fuel in fees (vs. fees calculated with infinite precision). [INFO] [stdout] 85 ~ // /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/fuel.rs:685:1 [INFO] [stdout] | [INFO] [stdout] 685 | / /// [INFO] [stdout] 686 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 690 | impl Neg for ZFuel { [INFO] [stdout] | - the comment documents this implementation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 686 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/fraction.rs:83:6 [INFO] [stdout] | [INFO] [stdout] 83 | impl<'a> Add for &'a Fraction { [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] 83 - impl<'a> Add for &'a Fraction { [INFO] [stdout] 83 + impl Add for &Fraction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/fraction.rs:94:6 [INFO] [stdout] | [INFO] [stdout] 94 | impl<'a> Sub for &'a Fraction { [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] 94 - impl<'a> Sub for &'a Fraction { [INFO] [stdout] 94 + impl Sub for &Fraction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/fraction.rs:105:6 [INFO] [stdout] | [INFO] [stdout] 105 | impl<'a> Mul for &'a Fraction { [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] 105 - impl<'a> Mul for &'a Fraction { [INFO] [stdout] 105 + impl Mul for &Fraction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/fraction.rs:116:6 [INFO] [stdout] | [INFO] [stdout] 116 | impl<'a> Div for &'a Fraction { [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] 116 - impl<'a> Div for &'a Fraction { [INFO] [stdout] 116 + impl Div for &Fraction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/fuel.rs:99:27 [INFO] [stdout] | [INFO] [stdout] 99 | pub const MAXVALUE: i64 = i64::max_value(); // 0x7fff_ffff_ffff_ffff; [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] 99 - pub const MAXVALUE: i64 = i64::max_value(); // 0x7fff_ffff_ffff_ffff; [INFO] [stdout] 99 + pub const MAXVALUE: i64 = i64::MAX; // 0x7fff_ffff_ffff_ffff; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/fuel.rs:430:40 [INFO] [stdout] | [INFO] [stdout] 430 | Some(mnt) => match mnt.as_str().as_ref() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `mnt.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [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] --> src/fuel.rs:434:35 [INFO] [stdout] | [INFO] [stdout] 434 | ... * u64::from_str_radix(mnt_str, 10).or_else(|_| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 435 | | ... Err(ZFuelError::Range(format!( [INFO] [stdout] 436 | | ... "Invalid z Fuel amount {}; bad mantissa {}", [INFO] [stdout] 437 | | ... amount, [INFO] [stdout] 438 | | ... mnt.as_str() [INFO] [stdout] 439 | | ... ))) [INFO] [stdout] 440 | | ... })? [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: try [INFO] [stdout] | [INFO] [stdout] 434 ~ * u64::from_str_radix(mnt_str, 10).map_err(|_| ZFuelError::Range(format!( [INFO] [stdout] 435 + "Invalid z Fuel amount {}; bad mantissa {}", [INFO] [stdout] 436 + amount, [INFO] [stdout] 437 + mnt.as_str() [INFO] [stdout] 438 ~ )))? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/fuel.rs:434:35 [INFO] [stdout] | [INFO] [stdout] 434 | ... * u64::from_str_radix(mnt_str, 10).or_else(|_| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `mnt_str.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [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] --> src/fuel.rs:446:27 [INFO] [stdout] | [INFO] [stdout] 446 | * u64::from_str_radix(int.as_str(), 10).or_else(|_| { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 447 | | Err(ZFuelError::Range(format!( [INFO] [stdout] 448 | | "Invalid z Fuel amount {}; bad int {}", [INFO] [stdout] 449 | | amount, [INFO] [stdout] 450 | | int.as_str() [INFO] [stdout] 451 | | ))) [INFO] [stdout] 452 | | })? [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] help: try [INFO] [stdout] | [INFO] [stdout] 446 ~ * u64::from_str_radix(int.as_str(), 10).map_err(|_| ZFuelError::Range(format!( [INFO] [stdout] 447 + "Invalid z Fuel amount {}; bad int {}", [INFO] [stdout] 448 + amount, [INFO] [stdout] 449 + int.as_str() [INFO] [stdout] 450 ~ )))? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/fuel.rs:446:27 [INFO] [stdout] | [INFO] [stdout] 446 | * u64::from_str_radix(int.as_str(), 10).or_else(|_| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `int.as_str().parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [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] --> src/fuel.rs:455:26 [INFO] [stdout] | [INFO] [stdout] 455 | Some(hex) => u64::from_str_radix(hex.as_str(), 16).or_else(|_| { [INFO] [stdout] | __________________________^ [INFO] [stdout] 456 | | Err(ZFuelError::Range(format!( [INFO] [stdout] 457 | | "Invalid z Fuel amount {}; bad hex {}", [INFO] [stdout] 458 | | amount, [INFO] [stdout] 459 | | hex.as_str() [INFO] [stdout] 460 | | ))) [INFO] [stdout] 461 | | })?, [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] help: try [INFO] [stdout] | [INFO] [stdout] 455 ~ Some(hex) => u64::from_str_radix(hex.as_str(), 16).map_err(|_| ZFuelError::Range(format!( [INFO] [stdout] 456 + "Invalid z Fuel amount {}; bad hex {}", [INFO] [stdout] 457 + amount, [INFO] [stdout] 458 + hex.as_str() [INFO] [stdout] 459 ~ )))?, [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] --> src/fuel.rs:467:26 [INFO] [stdout] | [INFO] [stdout] 467 | Some(fra) => u64::from_str_radix( [INFO] [stdout] | __________________________^ [INFO] [stdout] 468 | | // ".5" ==> "50000000" (truncate/fill to exactly EXPONENT width) [INFO] [stdout] 469 | | &format!( [INFO] [stdout] 470 | | "{:0 u64::from_str_radix( [INFO] [stdout] 468 + // ".5" ==> "50000000" (truncate/fill to exactly EXPONENT width) [INFO] [stdout] 469 + &format!( [INFO] [stdout] 470 + "{:0 src/fuel.rs:467:26 [INFO] [stdout] | [INFO] [stdout] 467 | Some(fra) => u64::from_str_radix( [INFO] [stdout] | __________________________^ [INFO] [stdout] 468 | | // ".5" ==> "50000000" (truncate/fill to exactly EXPONENT width) [INFO] [stdout] 469 | | &format!( [INFO] [stdout] 470 | | "{:0.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/fuel.rs:634:1 [INFO] [stdout] | [INFO] [stdout] 634 | / impl PartialOrd for ZFuel { [INFO] [stdout] 635 | | fn partial_cmp(&self, other: &ZFuel) -> Option { [INFO] [stdout] 636 | | // If precisions are the same, just compare units directly [INFO] [stdout] 637 | | if self.precision == other.precision { [INFO] [stdout] ... | [INFO] [stdout] 648 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 635 - fn partial_cmp(&self, other: &ZFuel) -> Option { [INFO] [stdout] 636 - // If precisions are the same, just compare units directly [INFO] [stdout] 637 - if self.precision == other.precision { [INFO] [stdout] 638 - return Some(self.units.cmp(&other.units)); [INFO] [stdout] 639 - } [INFO] [stdout] 640 - [INFO] [stdout] 641 - // Scale both to the same precision (use the higher one to avoid losing precision) [INFO] [stdout] 642 - let target_precision = std::cmp::max(self.precision, other.precision); [INFO] [stdout] 643 - let self_scaled = Self::scale_units(self.units, self.precision, target_precision).ok()?; [INFO] [stdout] 644 - let other_scaled = [INFO] [stdout] 645 - Self::scale_units(other.units, other.precision, target_precision).ok()?; [INFO] [stdout] 646 - Some(self_scaled.cmp(&other_scaled)) [INFO] [stdout] 647 - } [INFO] [stdout] 635 + fn partial_cmp(&self, other: &ZFuel) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1079:57 [INFO] [stdout] | [INFO] [stdout] 1079 | if let Some(product) = scaled_units.checked_mul(rhs.numerator as i64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.numerator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1081:39 [INFO] [stdout] | [INFO] [stdout] 1081 | let remainder = product % rhs.denominator as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1082:38 [INFO] [stdout] | [INFO] [stdout] 1082 | let quotient = product / rhs.denominator as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/fuel.rs:1087:21 [INFO] [stdout] | [INFO] [stdout] 1087 | / quotient [INFO] [stdout] 1088 | | .checked_add(1) [INFO] [stdout] 1089 | | .ok_or_else(|| ZFuelError::FractionOverflow((self, rhs)))? [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 `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 1089 - .ok_or_else(|| ZFuelError::FractionOverflow((self, rhs)))? [INFO] [stdout] 1089 + .ok_or(ZFuelError::FractionOverflow((self, rhs)))? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/fuel.rs:1091:21 [INFO] [stdout] | [INFO] [stdout] 1091 | / quotient [INFO] [stdout] 1092 | | .checked_sub(1) [INFO] [stdout] 1093 | | .ok_or_else(|| ZFuelError::FractionOverflow((self, rhs)))? [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 `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 1093 - .ok_or_else(|| ZFuelError::FractionOverflow((self, rhs)))? [INFO] [stdout] 1093 + .ok_or(ZFuelError::FractionOverflow((self, rhs)))? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1106:44 [INFO] [stdout] | [INFO] [stdout] 1106 | match scaled_units.checked_div(rhs.denominator as i64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1107:62 [INFO] [stdout] | [INFO] [stdout] 1107 | Some(quotient) => match quotient.checked_mul(rhs.numerator as i64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.numerator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1111:42 [INFO] [stdout] | [INFO] [stdout] 1111 | ... .checked_rem(rhs.denominator as i64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1112:61 [INFO] [stdout] | [INFO] [stdout] 1112 | ... .and_then(|rem| rem.checked_mul(rhs.numerator as i64)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.numerator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1119:54 [INFO] [stdout] | [INFO] [stdout] 1119 | ... .checked_add(rhs.denominator as i64 - 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1120:58 [INFO] [stdout] | [INFO] [stdout] 1120 | ... .map(|sum| sum / rhs.denominator as i64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1124:54 [INFO] [stdout] | [INFO] [stdout] 1124 | ... .checked_sub(rhs.denominator as i64 - 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1125:60 [INFO] [stdout] | [INFO] [stdout] 1125 | ... .map(|diff| diff / rhs.denominator as i64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: suspicious use of `*` in `Div` impl [INFO] [stdout] --> src/fuel.rs:1191:14 [INFO] [stdout] | [INFO] [stdout] 1191 | self * Fraction { [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_arithmetic_impl [INFO] [stdout] = note: `#[warn(clippy::suspicious_arithmetic_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/fraction.rs:83:6 [INFO] [stdout] | [INFO] [stdout] 83 | impl<'a> Add for &'a Fraction { [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] 83 - impl<'a> Add for &'a Fraction { [INFO] [stdout] 83 + impl Add for &Fraction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/fraction.rs:94:6 [INFO] [stdout] | [INFO] [stdout] 94 | impl<'a> Sub for &'a Fraction { [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] 94 - impl<'a> Sub for &'a Fraction { [INFO] [stdout] 94 + impl Sub for &Fraction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/fraction.rs:105:6 [INFO] [stdout] | [INFO] [stdout] 105 | impl<'a> Mul for &'a Fraction { [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] 105 - impl<'a> Mul for &'a Fraction { [INFO] [stdout] 105 + impl Mul for &Fraction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/fraction.rs:116:6 [INFO] [stdout] | [INFO] [stdout] 116 | impl<'a> Div for &'a Fraction { [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] 116 - impl<'a> Div for &'a Fraction { [INFO] [stdout] 116 + impl Div for &Fraction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/fuel.rs:99:27 [INFO] [stdout] | [INFO] [stdout] 99 | pub const MAXVALUE: i64 = i64::max_value(); // 0x7fff_ffff_ffff_ffff; [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] 99 - pub const MAXVALUE: i64 = i64::max_value(); // 0x7fff_ffff_ffff_ffff; [INFO] [stdout] 99 + pub const MAXVALUE: i64 = i64::MAX; // 0x7fff_ffff_ffff_ffff; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/fuel.rs:430:40 [INFO] [stdout] | [INFO] [stdout] 430 | Some(mnt) => match mnt.as_str().as_ref() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `mnt.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [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] --> src/fuel.rs:434:35 [INFO] [stdout] | [INFO] [stdout] 434 | ... * u64::from_str_radix(mnt_str, 10).or_else(|_| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 435 | | ... Err(ZFuelError::Range(format!( [INFO] [stdout] 436 | | ... "Invalid z Fuel amount {}; bad mantissa {}", [INFO] [stdout] 437 | | ... amount, [INFO] [stdout] 438 | | ... mnt.as_str() [INFO] [stdout] 439 | | ... ))) [INFO] [stdout] 440 | | ... })? [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: try [INFO] [stdout] | [INFO] [stdout] 434 ~ * u64::from_str_radix(mnt_str, 10).map_err(|_| ZFuelError::Range(format!( [INFO] [stdout] 435 + "Invalid z Fuel amount {}; bad mantissa {}", [INFO] [stdout] 436 + amount, [INFO] [stdout] 437 + mnt.as_str() [INFO] [stdout] 438 ~ )))? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/fuel.rs:434:35 [INFO] [stdout] | [INFO] [stdout] 434 | ... * u64::from_str_radix(mnt_str, 10).or_else(|_| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `mnt_str.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [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] --> src/fuel.rs:446:27 [INFO] [stdout] | [INFO] [stdout] 446 | * u64::from_str_radix(int.as_str(), 10).or_else(|_| { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 447 | | Err(ZFuelError::Range(format!( [INFO] [stdout] 448 | | "Invalid z Fuel amount {}; bad int {}", [INFO] [stdout] 449 | | amount, [INFO] [stdout] 450 | | int.as_str() [INFO] [stdout] 451 | | ))) [INFO] [stdout] 452 | | })? [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] help: try [INFO] [stdout] | [INFO] [stdout] 446 ~ * u64::from_str_radix(int.as_str(), 10).map_err(|_| ZFuelError::Range(format!( [INFO] [stdout] 447 + "Invalid z Fuel amount {}; bad int {}", [INFO] [stdout] 448 + amount, [INFO] [stdout] 449 + int.as_str() [INFO] [stdout] 450 ~ )))? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/fuel.rs:446:27 [INFO] [stdout] | [INFO] [stdout] 446 | * u64::from_str_radix(int.as_str(), 10).or_else(|_| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `int.as_str().parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [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] --> src/fuel.rs:455:26 [INFO] [stdout] | [INFO] [stdout] 455 | Some(hex) => u64::from_str_radix(hex.as_str(), 16).or_else(|_| { [INFO] [stdout] | __________________________^ [INFO] [stdout] 456 | | Err(ZFuelError::Range(format!( [INFO] [stdout] 457 | | "Invalid z Fuel amount {}; bad hex {}", [INFO] [stdout] 458 | | amount, [INFO] [stdout] 459 | | hex.as_str() [INFO] [stdout] 460 | | ))) [INFO] [stdout] 461 | | })?, [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] help: try [INFO] [stdout] | [INFO] [stdout] 455 ~ Some(hex) => u64::from_str_radix(hex.as_str(), 16).map_err(|_| ZFuelError::Range(format!( [INFO] [stdout] 456 + "Invalid z Fuel amount {}; bad hex {}", [INFO] [stdout] 457 + amount, [INFO] [stdout] 458 + hex.as_str() [INFO] [stdout] 459 ~ )))?, [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] --> src/fuel.rs:467:26 [INFO] [stdout] | [INFO] [stdout] 467 | Some(fra) => u64::from_str_radix( [INFO] [stdout] | __________________________^ [INFO] [stdout] 468 | | // ".5" ==> "50000000" (truncate/fill to exactly EXPONENT width) [INFO] [stdout] 469 | | &format!( [INFO] [stdout] 470 | | "{:0 u64::from_str_radix( [INFO] [stdout] 468 + // ".5" ==> "50000000" (truncate/fill to exactly EXPONENT width) [INFO] [stdout] 469 + &format!( [INFO] [stdout] 470 + "{:0 src/fuel.rs:467:26 [INFO] [stdout] | [INFO] [stdout] 467 | Some(fra) => u64::from_str_radix( [INFO] [stdout] | __________________________^ [INFO] [stdout] 468 | | // ".5" ==> "50000000" (truncate/fill to exactly EXPONENT width) [INFO] [stdout] 469 | | &format!( [INFO] [stdout] 470 | | "{:0.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/fuel.rs:634:1 [INFO] [stdout] | [INFO] [stdout] 634 | / impl PartialOrd for ZFuel { [INFO] [stdout] 635 | | fn partial_cmp(&self, other: &ZFuel) -> Option { [INFO] [stdout] 636 | | // If precisions are the same, just compare units directly [INFO] [stdout] 637 | | if self.precision == other.precision { [INFO] [stdout] ... | [INFO] [stdout] 648 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 635 - fn partial_cmp(&self, other: &ZFuel) -> Option { [INFO] [stdout] 636 - // If precisions are the same, just compare units directly [INFO] [stdout] 637 - if self.precision == other.precision { [INFO] [stdout] 638 - return Some(self.units.cmp(&other.units)); [INFO] [stdout] 639 - } [INFO] [stdout] 640 - [INFO] [stdout] 641 - // Scale both to the same precision (use the higher one to avoid losing precision) [INFO] [stdout] 642 - let target_precision = std::cmp::max(self.precision, other.precision); [INFO] [stdout] 643 - let self_scaled = Self::scale_units(self.units, self.precision, target_precision).ok()?; [INFO] [stdout] 644 - let other_scaled = [INFO] [stdout] 645 - Self::scale_units(other.units, other.precision, target_precision).ok()?; [INFO] [stdout] 646 - Some(self_scaled.cmp(&other_scaled)) [INFO] [stdout] 647 - } [INFO] [stdout] 635 + fn partial_cmp(&self, other: &ZFuel) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1079:57 [INFO] [stdout] | [INFO] [stdout] 1079 | if let Some(product) = scaled_units.checked_mul(rhs.numerator as i64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.numerator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1081:39 [INFO] [stdout] | [INFO] [stdout] 1081 | let remainder = product % rhs.denominator as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1082:38 [INFO] [stdout] | [INFO] [stdout] 1082 | let quotient = product / rhs.denominator as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/fuel.rs:1087:21 [INFO] [stdout] | [INFO] [stdout] 1087 | / quotient [INFO] [stdout] 1088 | | .checked_add(1) [INFO] [stdout] 1089 | | .ok_or_else(|| ZFuelError::FractionOverflow((self, rhs)))? [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 `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 1089 - .ok_or_else(|| ZFuelError::FractionOverflow((self, rhs)))? [INFO] [stdout] 1089 + .ok_or(ZFuelError::FractionOverflow((self, rhs)))? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/fuel.rs:1091:21 [INFO] [stdout] | [INFO] [stdout] 1091 | / quotient [INFO] [stdout] 1092 | | .checked_sub(1) [INFO] [stdout] 1093 | | .ok_or_else(|| ZFuelError::FractionOverflow((self, rhs)))? [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 `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 1093 - .ok_or_else(|| ZFuelError::FractionOverflow((self, rhs)))? [INFO] [stdout] 1093 + .ok_or(ZFuelError::FractionOverflow((self, rhs)))? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1106:44 [INFO] [stdout] | [INFO] [stdout] 1106 | match scaled_units.checked_div(rhs.denominator as i64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1107:62 [INFO] [stdout] | [INFO] [stdout] 1107 | Some(quotient) => match quotient.checked_mul(rhs.numerator as i64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.numerator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1111:42 [INFO] [stdout] | [INFO] [stdout] 1111 | ... .checked_rem(rhs.denominator as i64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1112:61 [INFO] [stdout] | [INFO] [stdout] 1112 | ... .and_then(|rem| rem.checked_mul(rhs.numerator as i64)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.numerator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1119:54 [INFO] [stdout] | [INFO] [stdout] 1119 | ... .checked_add(rhs.denominator as i64 - 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1120:58 [INFO] [stdout] | [INFO] [stdout] 1120 | ... .map(|sum| sum / rhs.denominator as i64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1124:54 [INFO] [stdout] | [INFO] [stdout] 1124 | ... .checked_sub(rhs.denominator as i64 - 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fuel.rs:1125:60 [INFO] [stdout] | [INFO] [stdout] 1125 | ... .map(|diff| diff / rhs.denominator as i64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: suspicious use of `*` in `Div` impl [INFO] [stdout] --> src/fuel.rs:1191:14 [INFO] [stdout] | [INFO] [stdout] 1191 | self * Fraction { [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_arithmetic_impl [INFO] [stdout] = note: `#[warn(clippy::suspicious_arithmetic_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fuel.rs:1326:45 [INFO] [stdout] | [INFO] [stdout] 1326 | format!("{:?}", ZFuel::from_str(&"9223372036854.775807")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `"9223372036854.775807"` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fuel.rs:1330:45 [INFO] [stdout] | [INFO] [stdout] 1330 | format!("{:?}", ZFuel::from_str(&"0x7fffffffffffffff")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `"0x7fffffffffffffff"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fuel.rs:1334:45 [INFO] [stdout] | [INFO] [stdout] 1334 | format!("{:?}", ZFuel::from_str(&"-9223372036854.775808")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `"-9223372036854.775808"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fuel.rs:1338:45 [INFO] [stdout] | [INFO] [stdout] 1338 | format!("{:?}", ZFuel::from_str(&"-0x8000000000000000")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `"-0x8000000000000000"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fuel.rs:1342:32 [INFO] [stdout] | [INFO] [stdout] 1342 | match ZFuel::from_str( &"9223372036854.775808" ) { // MAXRANGE + 1 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `"9223372036854.775808"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fuel.rs:1347:32 [INFO] [stdout] | [INFO] [stdout] 1347 | match ZFuel::from_str( &"-9223372036854.775809" ) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `"-9223372036854.775809"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1380:15 [INFO] [stdout] | [INFO] [stdout] 1380 | match ZFuel::from(1_000_000) + &ZFuel::from(2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^--------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `ZFuel::from(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/fuel.rs:1384:15 [INFO] [stdout] | [INFO] [stdout] 1384 | match &ZFuel::from(2_000_000) + ZFuel::from(1) { [INFO] [stdout] | -----------------------^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ZFuel::from(2_000_000)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/fuel.rs:1388:15 [INFO] [stdout] | [INFO] [stdout] 1388 | match &ZFuel::from(2_000_000) + &ZFuel::from(2) { [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] 1388 - match &ZFuel::from(2_000_000) + &ZFuel::from(2) { [INFO] [stdout] 1388 + match ZFuel::from(2_000_000) + ZFuel::from(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1398:15 [INFO] [stdout] | [INFO] [stdout] 1398 | match ZFuel::from_str("1") + &ZFuel::from(1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^--------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `ZFuel::from(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1406:15 [INFO] [stdout] | [INFO] [stdout] 1406 | match &ZFuel::from_str("1") + &ZFuel::from(1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^--------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `ZFuel::from(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/fuel.rs:1416:15 [INFO] [stdout] | [INFO] [stdout] 1416 | match &ZFuel::from(1) + ZFuel::from_str("1") { [INFO] [stdout] | ---------------^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ZFuel::from(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/fuel.rs:1424:15 [INFO] [stdout] | [INFO] [stdout] 1424 | match &ZFuel::from(1) + &ZFuel::from_str("1") { [INFO] [stdout] | ---------------^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ZFuel::from(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1447:15 [INFO] [stdout] | [INFO] [stdout] 1447 | match ZFuel::from(1_000_000) - &ZFuel::from(2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^--------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `ZFuel::from(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/fuel.rs:1451:15 [INFO] [stdout] | [INFO] [stdout] 1451 | match &ZFuel::from(2_000_000) - ZFuel::from(1) { [INFO] [stdout] | -----------------------^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ZFuel::from(2_000_000)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/fuel.rs:1455:15 [INFO] [stdout] | [INFO] [stdout] 1455 | match &ZFuel::from(2_000_000) - &ZFuel::from(2) { [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] 1455 - match &ZFuel::from(2_000_000) - &ZFuel::from(2) { [INFO] [stdout] 1455 + match ZFuel::from(2_000_000) - ZFuel::from(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1465:15 [INFO] [stdout] | [INFO] [stdout] 1465 | match ZFuel::from_str("1") - &ZFuel::from(1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^--------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `ZFuel::from(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1473:15 [INFO] [stdout] | [INFO] [stdout] 1473 | match &ZFuel::from_str("1") - &ZFuel::from(1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^--------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `ZFuel::from(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/fuel.rs:1483:15 [INFO] [stdout] | [INFO] [stdout] 1483 | match &ZFuel::from(1) - ZFuel::from_str("1") { [INFO] [stdout] | ---------------^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ZFuel::from(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/fuel.rs:1491:15 [INFO] [stdout] | [INFO] [stdout] 1491 | match &ZFuel::from(1) - &ZFuel::from_str("1") { [INFO] [stdout] | ---------------^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ZFuel::from(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1544:9 [INFO] [stdout] | [INFO] [stdout] 1544 | assert_eq!(ZFuel::from(1_000_001) > ZFuel::from(1_000_000), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1544 - assert_eq!(ZFuel::from(1_000_001) > ZFuel::from(1_000_000), true); [INFO] [stdout] 1544 + assert!(ZFuel::from(1_000_001) > ZFuel::from(1_000_000)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1545:9 [INFO] [stdout] | [INFO] [stdout] 1545 | assert_eq!(ZFuel::from(1_000_001) < ZFuel::from(1_000_000), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1545 - assert_eq!(ZFuel::from(1_000_001) < ZFuel::from(1_000_000), false); [INFO] [stdout] 1545 + assert!(!(ZFuel::from(1_000_001) < ZFuel::from(1_000_000))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1546:9 [INFO] [stdout] | [INFO] [stdout] 1546 | assert_eq!(ZFuel::from(1_000_000) < ZFuel::from(1_000_001), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1546 - assert_eq!(ZFuel::from(1_000_000) < ZFuel::from(1_000_001), true); [INFO] [stdout] 1546 + assert!(ZFuel::from(1_000_000) < ZFuel::from(1_000_001)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1548:9 [INFO] [stdout] | [INFO] [stdout] 1548 | assert_eq!(ZFuel::from(1_000_000) == ZFuel::from(1_000_001), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1548 - assert_eq!(ZFuel::from(1_000_000) == ZFuel::from(1_000_001), false); [INFO] [stdout] 1548 + assert!(!(ZFuel::from(1_000_000) == ZFuel::from(1_000_001))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1549:9 [INFO] [stdout] | [INFO] [stdout] 1549 | assert_eq!(ZFuel::from(1_000_000) <= ZFuel::from(1_000_001), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1549 - assert_eq!(ZFuel::from(1_000_000) <= ZFuel::from(1_000_001), true); [INFO] [stdout] 1549 + assert!(ZFuel::from(1_000_000) <= ZFuel::from(1_000_001)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1550:9 [INFO] [stdout] | [INFO] [stdout] 1550 | assert_eq!(ZFuel::from(1_000_000) >= ZFuel::from(1_000_001), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1550 - assert_eq!(ZFuel::from(1_000_000) >= ZFuel::from(1_000_001), false); [INFO] [stdout] 1550 + assert!(!(ZFuel::from(1_000_000) >= ZFuel::from(1_000_001))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1552:9 [INFO] [stdout] | [INFO] [stdout] 1552 | assert_eq!(ZFuel::from(1_000_000) == ZFuel::from(1_000_000), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1552 - assert_eq!(ZFuel::from(1_000_000) == ZFuel::from(1_000_000), true); [INFO] [stdout] 1552 + assert!(ZFuel::from(1_000_000) == ZFuel::from(1_000_000)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1553:9 [INFO] [stdout] | [INFO] [stdout] 1553 | assert_eq!(ZFuel::from(1_000_000) <= ZFuel::from(1_000_000), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1553 - assert_eq!(ZFuel::from(1_000_000) <= ZFuel::from(1_000_000), true); [INFO] [stdout] 1553 + assert!(ZFuel::from(1_000_000) <= ZFuel::from(1_000_000)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1554:9 [INFO] [stdout] | [INFO] [stdout] 1554 | assert_eq!(ZFuel::from(1_000_000) >= ZFuel::from(1_000_000), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1554 - assert_eq!(ZFuel::from(1_000_000) >= ZFuel::from(1_000_000), true); [INFO] [stdout] 1554 + assert!(ZFuel::from(1_000_000) >= ZFuel::from(1_000_000)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1562:9 [INFO] [stdout] | [INFO] [stdout] 1562 | assert_eq!(a == b, true); // Value-based equality: 10 == 10.000000 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1562 - assert_eq!(a == b, true); // Value-based equality: 10 == 10.000000 [INFO] [stdout] 1562 + assert!(a == b); // Value-based equality: 10 == 10.000000 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1563:9 [INFO] [stdout] | [INFO] [stdout] 1563 | assert_eq!(a < b, false); // Value-based: 10 is not < 10.000000 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1563 - assert_eq!(a < b, false); // Value-based: 10 is not < 10.000000 [INFO] [stdout] 1563 + assert!(!(a < b)); // Value-based: 10 is not < 10.000000 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1564:9 [INFO] [stdout] | [INFO] [stdout] 1564 | assert_eq!(a > b, false); // Value-based: 10 is not > 10.000000 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1564 - assert_eq!(a > b, false); // Value-based: 10 is not > 10.000000 [INFO] [stdout] 1564 + assert!(!(a > b)); // Value-based: 10 is not > 10.000000 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1565:9 [INFO] [stdout] | [INFO] [stdout] 1565 | assert_eq!(a <= b, true); // Value-based: 10 <= 10.000000 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1565 - assert_eq!(a <= b, true); // Value-based: 10 <= 10.000000 [INFO] [stdout] 1565 + assert!(a <= b); // Value-based: 10 <= 10.000000 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1566:9 [INFO] [stdout] | [INFO] [stdout] 1566 | assert_eq!(a >= b, true); // Value-based: 10 >= 10.000000 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1566 - assert_eq!(a >= b, true); // Value-based: 10 >= 10.000000 [INFO] [stdout] 1566 + assert!(a >= b); // Value-based: 10 >= 10.000000 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1571:9 [INFO] [stdout] | [INFO] [stdout] 1571 | assert_eq!(c < d, true); // 123.45 < 123.460 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1571 - assert_eq!(c < d, true); // 123.45 < 123.460 [INFO] [stdout] 1571 + assert!(c < d); // 123.45 < 123.460 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1572:9 [INFO] [stdout] | [INFO] [stdout] 1572 | assert_eq!(c > d, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1572 - assert_eq!(c > d, false); [INFO] [stdout] 1572 + assert!(!(c > d)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1573:9 [INFO] [stdout] | [INFO] [stdout] 1573 | assert_eq!(c <= d, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1573 - assert_eq!(c <= d, true); [INFO] [stdout] 1573 + assert!(c <= d); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1574:9 [INFO] [stdout] | [INFO] [stdout] 1574 | assert_eq!(c >= d, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1574 - assert_eq!(c >= d, false); [INFO] [stdout] 1574 + assert!(!(c >= d)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1579:9 [INFO] [stdout] | [INFO] [stdout] 1579 | assert_eq!(e < f, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1579 - assert_eq!(e < f, true); [INFO] [stdout] 1579 + assert!(e < f); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1580:9 [INFO] [stdout] | [INFO] [stdout] 1580 | assert_eq!(e > f, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1580 - assert_eq!(e > f, false); [INFO] [stdout] 1580 + assert!(!(e > f)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1581:9 [INFO] [stdout] | [INFO] [stdout] 1581 | assert_eq!(e <= f, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1581 - assert_eq!(e <= f, true); [INFO] [stdout] 1581 + assert!(e <= f); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fuel.rs:1582:9 [INFO] [stdout] | [INFO] [stdout] 1582 | assert_eq!(e >= f, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1582 - assert_eq!(e >= f, false); [INFO] [stdout] 1582 + assert!(!(e >= f)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1626:22 [INFO] [stdout] | [INFO] [stdout] 1626 | let feeamt = ZFuel { [INFO] [stdout] | ______________________^ [INFO] [stdout] 1627 | | units: 399, [INFO] [stdout] 1628 | | precision: Precision::DEFAULT, [INFO] [stdout] 1629 | | } * &feepct; [INFO] [stdout] | |_____________------^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `feepct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1640:22 [INFO] [stdout] | [INFO] [stdout] 1640 | let feeamt = ZFuel { [INFO] [stdout] | ______________________^ [INFO] [stdout] 1641 | | units: 399, [INFO] [stdout] 1642 | | precision: Precision::DEFAULT, [INFO] [stdout] 1643 | | } / &inv_feepct; [INFO] [stdout] | |_____________----------^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `inv_feepct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1656:22 [INFO] [stdout] | [INFO] [stdout] 1656 | let feeamt = amount * &feepct; [INFO] [stdout] | ^^^^^^^^^------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `feepct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1661:15 [INFO] [stdout] | [INFO] [stdout] 1661 | match ZFuel::new(fuel::MINVALUE, Precision::DEFAULT) * &feepct { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `feepct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/fuel.rs:1672:15 [INFO] [stdout] | [INFO] [stdout] 1672 | match &ZFuel::from(fuel::MAXVALUE) * Fraction::new(35, 1000).unwrap().reduce() { [INFO] [stdout] | ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ZFuel::from(fuel::MAXVALUE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1676:15 [INFO] [stdout] | [INFO] [stdout] 1676 | match ZFuel::from(fuel::MAXVALUE) * &Fraction::new(35, 1000).unwrap().reduce() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------------------------------ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `Fraction::new(35, 1000).unwrap().reduce()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/fuel.rs:1680:15 [INFO] [stdout] | [INFO] [stdout] 1680 | match &ZFuel::from(fuel::MAXVALUE) * &Fraction::new(35, 1000).unwrap().reduce() { [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] 1680 - match &ZFuel::from(fuel::MAXVALUE) * &Fraction::new(35, 1000).unwrap().reduce() { [INFO] [stdout] 1680 + match ZFuel::from(fuel::MAXVALUE) * Fraction::new(35, 1000).unwrap().reduce() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/fuel.rs:1689:15 [INFO] [stdout] | [INFO] [stdout] 1689 | match &ZFuel::from(fuel::MAXVALUE) / Fraction::new(1000, 35).unwrap().reduce() { [INFO] [stdout] | ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `ZFuel::from(fuel::MAXVALUE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/fuel.rs:1693:15 [INFO] [stdout] | [INFO] [stdout] 1693 | match ZFuel::from(fuel::MAXVALUE) / &Fraction::new(1000, 35).unwrap().reduce() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------------------------------ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `Fraction::new(1000, 35).unwrap().reduce()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/fuel.rs:1697:15 [INFO] [stdout] | [INFO] [stdout] 1697 | match &ZFuel::from(fuel::MAXVALUE) / &Fraction::new(1000, 35).unwrap().reduce() { [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] 1697 - match &ZFuel::from(fuel::MAXVALUE) / &Fraction::new(1000, 35).unwrap().reduce() { [INFO] [stdout] 1697 + match ZFuel::from(fuel::MAXVALUE) / Fraction::new(1000, 35).unwrap().reduce() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/precision.rs:617:17 [INFO] [stdout] | [INFO] [stdout] 617 | assert!(!(b < a)); [INFO] [stdout] | ^^^^^^^^ help: try: `(b >= a)` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/precision.rs:623:17 [INFO] [stdout] | [INFO] [stdout] 623 | assert!(!(d < c)); [INFO] [stdout] | ^^^^^^^^ help: try: `(d >= c)` [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: this boolean expression can be simplified [INFO] [stdout] --> src/precision.rs:631:17 [INFO] [stdout] | [INFO] [stdout] 631 | assert!(!(a > b)); [INFO] [stdout] | ^^^^^^^^ help: try: `(a <= b)` [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: this boolean expression can be simplified [INFO] [stdout] --> src/precision.rs:635:17 [INFO] [stdout] | [INFO] [stdout] 635 | assert!(!(c > d)); [INFO] [stdout] | ^^^^^^^^ help: try: `(c <= d)` [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: this boolean expression can be simplified [INFO] [stdout] --> src/precision.rs:659:17 [INFO] [stdout] | [INFO] [stdout] 659 | assert!(!(e1 < e2)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `(e1 >= e2)` [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: this boolean expression can be simplified [INFO] [stdout] --> src/precision.rs:660:17 [INFO] [stdout] | [INFO] [stdout] 660 | assert!(!(e1 > e2)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `(e1 <= e2)` [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] [stderr] Finished `dev` profile [optimized + debuginfo] target(s) in 12.84s [INFO] running `Command { std: "docker" "inspect" "3dcd42ad0b05aedb168fce76d5c8ba03200b088cf7c22fe14a4b57de08fe95b7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3dcd42ad0b05aedb168fce76d5c8ba03200b088cf7c22fe14a4b57de08fe95b7", kill_on_drop: false }` [INFO] [stdout] 3dcd42ad0b05aedb168fce76d5c8ba03200b088cf7c22fe14a4b57de08fe95b7