[INFO] fetching crate noble-staking-reward-curve 2.0.0... [INFO] linting noble-staking-reward-curve-2.0.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate noble-staking-reward-curve 2.0.0 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate noble-staking-reward-curve 2.0.0 [INFO] finished tweaking crates.io crate noble-staking-reward-curve 2.0.0 [INFO] tweaked toml for crates.io crate noble-staking-reward-curve 2.0.0 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate noble-staking-reward-curve 2.0.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 230 packages to latest compatible versions [INFO] [stderr] Adding proc-macro-crate v0.1.5 (available: v3.5.0) [INFO] [stderr] Adding syn v1.0.109 (available: v2.0.117) [INFO] [stderr] Adding zeroize v1.3.0 (available: v1.8.2) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tetsy-primitive-types v0.9.1 [INFO] [stderr] Downloaded dyn-clonable-impl v0.9.2 [INFO] [stderr] Downloaded dyn-clonable v0.9.2 [INFO] [stderr] Downloaded externalities v2.1.2 [INFO] [stderr] Downloaded tetcore-storage v2.1.2 [INFO] [stderr] Downloaded tp-runtime-interface v2.1.2 [INFO] [stderr] Downloaded merlin v2.0.1 [INFO] [stderr] Downloaded tetcore-wasm-interface v2.1.2 [INFO] [stderr] Downloaded tetsy-hash-db v0.15.3 [INFO] [stderr] Downloaded tetsy-util-mem-derive v0.1.1 [INFO] [stderr] Downloaded memory_units v0.3.0 [INFO] [stderr] Downloaded tetsy-memory-db v0.26.0 [INFO] [stderr] Downloaded pbkdf2 v0.3.0 [INFO] [stderr] Downloaded paste v0.1.18 [INFO] [stderr] Downloaded tetsy-impl-codec v0.5.1 [INFO] [stderr] Downloaded tet-application-crypto v2.1.2 [INFO] [stderr] Downloaded panic-handler v2.1.2 [INFO] [stderr] Downloaded base58 v0.1.0 [INFO] [stderr] Downloaded blake2-rfc v0.2.18 [INFO] [stderr] Downloaded paste-impl v0.1.18 [INFO] [stderr] Downloaded tetcore-tracing v2.1.2 [INFO] [stderr] Downloaded tetsy-fixed-hash v0.7.1 [INFO] [stderr] Downloaded tp-keystore v2.1.2 [INFO] [stderr] Downloaded tetcore-bip39 v0.4.2 [INFO] [stderr] Downloaded uint-crate v0.9.1 [INFO] [stderr] Downloaded environ v1.1.3 [INFO] [stderr] Downloaded arithmetic v2.1.2 [INFO] [stderr] Downloaded tp-trie v2.1.2 [INFO] [stderr] Downloaded tet-core v2.1.2 [INFO] [stderr] Downloaded tp-state-machine v2.1.2 [INFO] [stderr] Downloaded twasmi v0.6.2 [INFO] [stderr] Downloaded tetsy-wasm v0.41.0 [INFO] [stderr] Downloaded tetsy-trie-db v0.22.3 [INFO] [stderr] Downloaded tetsy-impl-serde v0.3.2 [INFO] [stderr] Downloaded ahash v0.4.8 [INFO] [stderr] Downloaded tetsy-scale-codec v2.0.1 [INFO] [stderr] Downloaded tp-runtime v2.1.2 [INFO] [stderr] Downloaded tp-runtime-interface-proc-macro v2.1.2 [INFO] [stderr] Downloaded tetsy-trie-root v0.16.1 [INFO] [stderr] Downloaded tet-io v2.1.2 [INFO] [stderr] Downloaded tetcore-std v2.1.2 [INFO] [stderr] Downloaded debug-derive v2.1.2 [INFO] [stderr] Downloaded twasmi-validation v0.3.0 [INFO] [stderr] Downloaded tetsy-hash256-std-hasher v0.15.3 [INFO] [stderr] Downloaded tetsy-scale-codec-derive v2.0.1 [INFO] [stderr] Downloaded tetsy-util-mem v0.9.1 [INFO] [stderr] Downloaded secrecy v0.7.0 [INFO] [stderr] Downloaded curve25519-dalek v2.1.3 [INFO] [stderr] Downloaded schnorrkel v0.9.1 [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] be702dfee952ae991cb21ee99e60cda06a3627c53f55235e4c20a117192ef90e [INFO] running `Command { std: "docker" "start" "-a" "be702dfee952ae991cb21ee99e60cda06a3627c53f55235e4c20a117192ef90e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "be702dfee952ae991cb21ee99e60cda06a3627c53f55235e4c20a117192ef90e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "be702dfee952ae991cb21ee99e60cda06a3627c53f55235e4c20a117192ef90e", kill_on_drop: false }` [INFO] [stdout] be702dfee952ae991cb21ee99e60cda06a3627c53f55235e4c20a117192ef90e [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] e65517bc164d81afc4e33ec6782211f61780d6d81bdcf651cc85dde2f8e884e8 [INFO] running `Command { std: "docker" "start" "-a" "e65517bc164d81afc4e33ec6782211f61780d6d81bdcf651cc85dde2f8e884e8", kill_on_drop: false }` [INFO] [stderr] Checking byteorder v1.5.0 [INFO] [stderr] Compiling radium v0.6.2 [INFO] [stderr] Compiling getrandom v0.1.16 [INFO] [stderr] Checking arrayvec v0.5.2 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking funty v1.1.0 [INFO] [stderr] Checking wyz v0.2.0 [INFO] [stderr] Checking byte-slice-cast v1.2.3 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Checking generic-array v0.12.4 [INFO] [stderr] Checking subtle v2.6.1 [INFO] [stderr] Compiling crunchy v0.2.4 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Compiling num-bigint v0.2.6 [INFO] [stderr] Checking tetcore-std v2.1.2 [INFO] [stderr] Checking byte-tools v0.3.1 [INFO] [stderr] Checking subtle v1.0.0 [INFO] [stderr] Checking rustc-hex v2.1.0 [INFO] [stderr] Compiling aho-corasick v1.1.4 [INFO] [stderr] Checking block-padding v0.1.5 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Compiling num-rational v0.2.4 [INFO] [stderr] Checking opaque-debug v0.2.3 [INFO] [stderr] Checking fake-simd v0.1.2 [INFO] [stderr] Checking digest v0.8.1 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking crypto-mac v0.7.0 [INFO] [stderr] Checking tetsy-fixed-hash v0.7.1 [INFO] [stderr] Checking block-buffer v0.7.3 [INFO] [stderr] Checking ahash v0.4.8 [INFO] [stderr] Checking uint-crate v0.9.1 [INFO] [stderr] Checking tetsy-wasm v0.41.0 [INFO] [stderr] Checking chrono v0.4.44 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking tracing-log v0.1.4 [INFO] [stderr] Checking parking_lot_core v0.8.6 [INFO] [stderr] Checking bitvec v0.20.4 [INFO] [stderr] Checking rand_chacha v0.2.2 [INFO] [stderr] Checking rand_pcg v0.2.1 [INFO] [stderr] Checking hashbrown v0.9.1 [INFO] [stderr] Checking matchers v0.0.1 [INFO] [stderr] Checking hmac v0.7.1 [INFO] [stderr] Checking sha2 v0.8.2 [INFO] [stderr] Checking crypto-mac v0.8.0 [INFO] [stderr] Checking memory_units v0.3.0 [INFO] [stderr] Compiling tetsy-util-mem v0.9.1 [INFO] [stderr] Checking downcast-rs v1.2.1 [INFO] [stderr] Checking tetsy-hash-db v0.15.3 [INFO] [stderr] Compiling arrayvec v0.4.12 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Checking signature v1.6.4 [INFO] [stderr] Checking environ v1.1.3 [INFO] [stderr] Checking nodrop v0.1.14 [INFO] [stderr] Checking pbkdf2 v0.4.0 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Checking hmac v0.8.1 [INFO] [stderr] Checking ed25519 v1.5.3 [INFO] [stderr] Checking hmac-drbg v0.2.0 [INFO] [stderr] Checking pbkdf2 v0.3.0 [INFO] [stderr] Checking constant_time_eq v0.1.5 [INFO] [stderr] Checking tiny-keccak v2.0.2 [INFO] [stderr] Checking tetsy-hash256-std-hasher v0.15.3 [INFO] [stderr] Checking twox-hash v1.6.3 [INFO] [stderr] Checking base58 v0.1.0 [INFO] [stderr] Checking tetsy-trie-root v0.16.1 [INFO] [stderr] Checking panic-handler v2.1.2 [INFO] [stderr] Compiling paste-impl v0.1.18 [INFO] [stderr] Checking integer-sqrt v0.1.5 [INFO] [stderr] Checking tetsy-trie-db v0.22.3 [INFO] [stderr] Checking blake2-rfc v0.2.18 [INFO] [stderr] Compiling regex-automata v0.4.14 [INFO] [stderr] Checking libsecp256k1 v0.3.5 [INFO] [stderr] Checking paste v0.1.18 [INFO] [stderr] Checking twasmi-validation v0.3.0 [INFO] [stderr] Checking twasmi v0.6.2 [INFO] [stderr] Compiling regex v1.12.3 [INFO] [stderr] Compiling Inflector v0.11.4 [INFO] [stderr] Compiling synstructure v0.12.6 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling zeroize_derive v1.4.3 [INFO] [stderr] Compiling ref-cast-impl v1.0.25 [INFO] [stderr] Compiling impl-trait-for-tuples v0.2.3 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling dyn-clonable-impl v0.9.2 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling derive_more v0.99.20 [INFO] [stderr] Compiling debug-derive v2.1.2 [INFO] [stderr] Compiling tetsy-util-mem-derive v0.1.1 [INFO] [stderr] Checking dyn-clonable v0.9.2 [INFO] [stderr] Checking ref-cast v1.0.25 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking zeroize v1.3.0 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Checking merlin v2.0.1 [INFO] [stderr] Checking curve25519-dalek v2.1.3 [INFO] [stderr] Checking curve25519-dalek v3.2.1 [INFO] [stderr] Checking tiny-bip39 v0.8.2 [INFO] [stderr] Checking secrecy v0.7.0 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking tetsy-impl-serde v0.3.2 [INFO] [stderr] Checking tracing-serde v0.1.3 [INFO] [stderr] Checking impl-serde v0.3.2 [INFO] [stderr] Checking schnorrkel v0.9.1 [INFO] [stderr] Checking ed25519-dalek v1.0.1 [INFO] [stderr] Checking toml v0.5.11 [INFO] [stderr] Checking futures-executor v0.3.32 [INFO] [stderr] Checking tracing-subscriber v0.2.25 [INFO] [stderr] Checking futures v0.3.32 [INFO] [stderr] Checking tetcore-bip39 v0.4.2 [INFO] [stderr] Checking proc-macro-crate v0.1.5 [INFO] [stderr] Checking noble-staking-reward-curve v2.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | /// const I_NPOS: PiecewiseLinear<'static> = curve!( [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | /// min_inflation: 0_025_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | /// max_inflation: 0_100_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | /// ideal_stake: 0_500_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | /// falloff: 0_050_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | /// max_piece_count: 40, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | /// test_precision: 0_005_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | /// ); [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | min: 0_100_000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] = note: `#[warn(clippy::zero_prefixed_literal)]` on by default [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 207 - min: 0_100_000, [INFO] [stdout] 207 + min: 100_000, [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 207 - min: 0_100_000, [INFO] [stdout] 207 + min: 0o100_000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | max: 0_900_000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 209 - max: 0_900_000, [INFO] [stdout] 209 + max: 900_000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | min: 0_010_000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 214 - min: 0_010_000, [INFO] [stdout] 214 + min: 10_000, [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 214 - min: 0_010_000, [INFO] [stdout] 214 + min: 0o10_000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/log.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | while !(p >= pow2!(n) * q) || !(p < pow2!(n + 1) * q) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(p < pow2!(n) * q)` [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/log.rs:49:32 [INFO] [stdout] | [INFO] [stdout] 49 | while !(p >= pow2!(n) * q) || !(p < pow2!(n + 1) * q) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(p >= pow2!(n + 1) * q)` [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: usage of a legacy numeric method [INFO] [stdout] --> src/log.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | assert!(p <= u32::max_value()/2); [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] 36 - assert!(p <= u32::max_value()/2); [INFO] [stdout] 36 + assert!(p <= u32::MAX/2); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u32` [INFO] [stdout] --> src/log.rs:55:19 [INFO] [stdout] | [INFO] [stdout] 55 | let y_num: u32 = (p - pow2!(n) * q).try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u32` [INFO] [stdout] --> src/log.rs:56:19 [INFO] [stdout] | [INFO] [stdout] 56 | let y_den: u32 = (p + pow2!(n) * q).try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:161:17 [INFO] [stdout] | [INFO] [stdout] 161 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:162:26 [INFO] [stdout] | [INFO] [stdout] 162 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:163:37 [INFO] [stdout] | [INFO] [stdout] 163 | let value_lit = syn::LitInt::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:178:31 [INFO] [stdout] | [INFO] [stdout] 178 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:179:35 [INFO] [stdout] | [INFO] [stdout] 179 | let ident = ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:180:27 [INFO] [stdout] | [INFO] [stdout] 180 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:181:32 [INFO] [stdout] | [INFO] [stdout] 181 | let typ = ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:182:27 [INFO] [stdout] | [INFO] [stdout] 182 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:183:27 [INFO] [stdout] | [INFO] [stdout] 183 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:184:27 [INFO] [stdout] | [INFO] [stdout] 184 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:186:27 [INFO] [stdout] | [INFO] [stdout] 186 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: usage of a legacy numeric method [INFO] [stdout] --> src/lib.rs:277:11 [INFO] [stdout] | [INFO] [stdout] 277 | return u32::max_value(); [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] 277 - return u32::max_value(); [INFO] [stdout] 277 + return u32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `proc_macro2::TokenStream` [INFO] [stdout] --> src/lib.rs:395:2 [INFO] [stdout] | [INFO] [stdout] 395 | / quote!( [INFO] [stdout] 396 | | #[cfg(test)] [INFO] [stdout] 397 | | mod __noble_staking_reward_curve_test_module { [INFO] [stdout] 398 | | fn i_npos(x: f64) -> f64 { [INFO] [stdout] ... | [INFO] [stdout] 445 | | ).into() [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 395 ~ quote!( [INFO] [stdout] 396 ~ #[cfg(test)] [INFO] [stdout] 397 ~ mod __noble_staking_reward_curve_test_module { [INFO] [stdout] 398 ~ fn i_npos(x: f64) -> f64 { [INFO] [stdout] 399 ~ if x <= #x_ideal { [INFO] [stdout] 400 ~ #i_0 + x * (#i_ideal - #i_0 / #x_ideal) [INFO] [stdout] 401 ~ } else { [INFO] [stdout] 402 ~ #i_0 + (#i_ideal_times_x_ideal - #i_0) * 2_f64.powf((#x_ideal - x) / #d) [INFO] [stdout] 403 ~ } [INFO] [stdout] 404 ~ } [INFO] [stdout] 405 + [INFO] [stdout] 406 ~ const MILLION: u32 = 1_000_000; [INFO] [stdout] 407 + [INFO] [stdout] 408 ~ #[test] [INFO] [stdout] 409 ~ fn reward_curve_precision() { [INFO] [stdout] 410 ~ for &base in [MILLION, u32::max_value()].iter() { [INFO] [stdout] 411 ~ let number_of_check = 100_000.min(base); [INFO] [stdout] 412 ~ for check_index in 0..=number_of_check { [INFO] [stdout] 413 ~ let i = (check_index as u64 * base as u64 / number_of_check as u64) as u32; [INFO] [stdout] 414 ~ let x = i as f64 / base as f64; [INFO] [stdout] 415 ~ let float_res = (i_npos(x) * base as f64).round() as u32; [INFO] [stdout] 416 ~ let int_res = super::#ident.calculate_for_fraction_times_denominator(i, base); [INFO] [stdout] 417 ~ let err = ( [INFO] [stdout] 418 ~ (float_res.max(int_res) - float_res.min(int_res)) as u64 [INFO] [stdout] 419 ~ * MILLION as u64 [INFO] [stdout] 420 ~ / float_res as u64 [INFO] [stdout] 421 ~ ) as u32; [INFO] [stdout] 422 ~ if err > #precision { [INFO] [stdout] 423 ~ panic!(format!("\n\ [INFO] [stdout] 424 ~ Generated reward curve approximation differ from real one:\n\t\ [INFO] [stdout] 425 ~ for i = {} and base = {}, f(i/base) * base = {},\n\t\ [INFO] [stdout] 426 ~ but approximation = {},\n\t\ [INFO] [stdout] 427 ~ err = {:07} millionth,\n\t\ [INFO] [stdout] 428 ~ try increase the number of segment: {} or the test_error: {}.\n", [INFO] [stdout] 429 ~ i, base, float_res, int_res, err, #max_piece_count, #precision [INFO] [stdout] 430 ~ )); [INFO] [stdout] 431 ~ } [INFO] [stdout] 432 ~ } [INFO] [stdout] 433 ~ } [INFO] [stdout] 434 ~ } [INFO] [stdout] 435 + [INFO] [stdout] 436 ~ #[test] [INFO] [stdout] 437 ~ fn reward_curve_piece_count() { [INFO] [stdout] 438 ~ assert!( [INFO] [stdout] 439 ~ super::#ident.points.len() as u32 - 1 <= #max_piece_count, [INFO] [stdout] 440 ~ "Generated reward curve approximation is invalid: \ [INFO] [stdout] 441 ~ has more points than specified, please fill an issue." [INFO] [stdout] 442 ~ ); [INFO] [stdout] 443 ~ } [INFO] [stdout] 444 ~ } [INFO] [stdout] 445 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/lib.rs:356:25 [INFO] [stdout] | [INFO] [stdout] 356 | let error = || panic!(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 357 | | "Generated reward curve approximation doesn't fit into [0, 1] -> [0, 1] \ [INFO] [stdout] 358 | | because of point: [INFO] [stdout] 359 | | x = {:07} per million [INFO] [stdout] 360 | | y = {:07} per million", [INFO] [stdout] 361 | | x, y [INFO] [stdout] 362 | | )); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: the `panic!()` macro supports formatting, so there's no need for the `format!()` macro here [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: remove the `format!(..)` macro call [INFO] [stdout] | [INFO] [stdout] 356 ~ let error = || panic!( [INFO] [stdout] 357 | "Generated reward curve approximation doesn't fit into [0, 1] -> [0, 1] \ [INFO] [stdout] ... [INFO] [stdout] 361 | x, y [INFO] [stdout] 362 ~ ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling tetsy-scale-codec-derive v2.0.1 [INFO] [stderr] Compiling tp-runtime-interface-proc-macro v2.1.2 [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | /// const I_NPOS: PiecewiseLinear<'static> = curve!( [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | /// min_inflation: 0_025_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | /// max_inflation: 0_100_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | /// ideal_stake: 0_500_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | /// falloff: 0_050_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | /// max_piece_count: 40, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | /// test_precision: 0_005_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | /// ); [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | min: 0_100_000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] = note: `#[warn(clippy::zero_prefixed_literal)]` on by default [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 207 - min: 0_100_000, [INFO] [stdout] 207 + min: 100_000, [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 207 - min: 0_100_000, [INFO] [stdout] 207 + min: 0o100_000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | max: 0_900_000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 209 - max: 0_900_000, [INFO] [stdout] 209 + max: 900_000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | min: 0_010_000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 214 - min: 0_010_000, [INFO] [stdout] 214 + min: 10_000, [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 214 - min: 0_010_000, [INFO] [stdout] 214 + min: 0o10_000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/log.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | while !(p >= pow2!(n) * q) || !(p < pow2!(n + 1) * q) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(p < pow2!(n) * q)` [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/log.rs:49:32 [INFO] [stdout] | [INFO] [stdout] 49 | while !(p >= pow2!(n) * q) || !(p < pow2!(n + 1) * q) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(p >= pow2!(n + 1) * q)` [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: usage of a legacy numeric method [INFO] [stdout] --> src/log.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | assert!(p <= u32::max_value()/2); [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] 36 - assert!(p <= u32::max_value()/2); [INFO] [stdout] 36 + assert!(p <= u32::MAX/2); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u32` [INFO] [stdout] --> src/log.rs:55:19 [INFO] [stdout] | [INFO] [stdout] 55 | let y_num: u32 = (p - pow2!(n) * q).try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u32` [INFO] [stdout] --> src/log.rs:56:19 [INFO] [stdout] | [INFO] [stdout] 56 | let y_den: u32 = (p + pow2!(n) * q).try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:161:17 [INFO] [stdout] | [INFO] [stdout] 161 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:162:26 [INFO] [stdout] | [INFO] [stdout] 162 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:163:37 [INFO] [stdout] | [INFO] [stdout] 163 | let value_lit = syn::LitInt::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:178:31 [INFO] [stdout] | [INFO] [stdout] 178 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:179:35 [INFO] [stdout] | [INFO] [stdout] 179 | let ident = ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:180:27 [INFO] [stdout] | [INFO] [stdout] 180 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:181:32 [INFO] [stdout] | [INFO] [stdout] 181 | let typ = ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:182:27 [INFO] [stdout] | [INFO] [stdout] 182 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:183:27 [INFO] [stdout] | [INFO] [stdout] 183 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:184:27 [INFO] [stdout] | [INFO] [stdout] 184 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:186:27 [INFO] [stdout] | [INFO] [stdout] 186 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: usage of a legacy numeric method [INFO] [stdout] --> src/lib.rs:277:11 [INFO] [stdout] | [INFO] [stdout] 277 | return u32::max_value(); [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] 277 - return u32::max_value(); [INFO] [stdout] 277 + return u32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `proc_macro2::TokenStream` [INFO] [stdout] --> src/lib.rs:395:2 [INFO] [stdout] | [INFO] [stdout] 395 | / quote!( [INFO] [stdout] 396 | | #[cfg(test)] [INFO] [stdout] 397 | | mod __noble_staking_reward_curve_test_module { [INFO] [stdout] 398 | | fn i_npos(x: f64) -> f64 { [INFO] [stdout] ... | [INFO] [stdout] 445 | | ).into() [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 395 ~ quote!( [INFO] [stdout] 396 ~ #[cfg(test)] [INFO] [stdout] 397 ~ mod __noble_staking_reward_curve_test_module { [INFO] [stdout] 398 ~ fn i_npos(x: f64) -> f64 { [INFO] [stdout] 399 ~ if x <= #x_ideal { [INFO] [stdout] 400 ~ #i_0 + x * (#i_ideal - #i_0 / #x_ideal) [INFO] [stdout] 401 ~ } else { [INFO] [stdout] 402 ~ #i_0 + (#i_ideal_times_x_ideal - #i_0) * 2_f64.powf((#x_ideal - x) / #d) [INFO] [stdout] 403 ~ } [INFO] [stdout] 404 ~ } [INFO] [stdout] 405 + [INFO] [stdout] 406 ~ const MILLION: u32 = 1_000_000; [INFO] [stdout] 407 + [INFO] [stdout] 408 ~ #[test] [INFO] [stdout] 409 ~ fn reward_curve_precision() { [INFO] [stdout] 410 ~ for &base in [MILLION, u32::max_value()].iter() { [INFO] [stdout] 411 ~ let number_of_check = 100_000.min(base); [INFO] [stdout] 412 ~ for check_index in 0..=number_of_check { [INFO] [stdout] 413 ~ let i = (check_index as u64 * base as u64 / number_of_check as u64) as u32; [INFO] [stdout] 414 ~ let x = i as f64 / base as f64; [INFO] [stdout] 415 ~ let float_res = (i_npos(x) * base as f64).round() as u32; [INFO] [stdout] 416 ~ let int_res = super::#ident.calculate_for_fraction_times_denominator(i, base); [INFO] [stdout] 417 ~ let err = ( [INFO] [stdout] 418 ~ (float_res.max(int_res) - float_res.min(int_res)) as u64 [INFO] [stdout] 419 ~ * MILLION as u64 [INFO] [stdout] 420 ~ / float_res as u64 [INFO] [stdout] 421 ~ ) as u32; [INFO] [stdout] 422 ~ if err > #precision { [INFO] [stdout] 423 ~ panic!(format!("\n\ [INFO] [stdout] 424 ~ Generated reward curve approximation differ from real one:\n\t\ [INFO] [stdout] 425 ~ for i = {} and base = {}, f(i/base) * base = {},\n\t\ [INFO] [stdout] 426 ~ but approximation = {},\n\t\ [INFO] [stdout] 427 ~ err = {:07} millionth,\n\t\ [INFO] [stdout] 428 ~ try increase the number of segment: {} or the test_error: {}.\n", [INFO] [stdout] 429 ~ i, base, float_res, int_res, err, #max_piece_count, #precision [INFO] [stdout] 430 ~ )); [INFO] [stdout] 431 ~ } [INFO] [stdout] 432 ~ } [INFO] [stdout] 433 ~ } [INFO] [stdout] 434 ~ } [INFO] [stdout] 435 + [INFO] [stdout] 436 ~ #[test] [INFO] [stdout] 437 ~ fn reward_curve_piece_count() { [INFO] [stdout] 438 ~ assert!( [INFO] [stdout] 439 ~ super::#ident.points.len() as u32 - 1 <= #max_piece_count, [INFO] [stdout] 440 ~ "Generated reward curve approximation is invalid: \ [INFO] [stdout] 441 ~ has more points than specified, please fill an issue." [INFO] [stdout] 442 ~ ); [INFO] [stdout] 443 ~ } [INFO] [stdout] 444 ~ } [INFO] [stdout] 445 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/lib.rs:356:25 [INFO] [stdout] | [INFO] [stdout] 356 | let error = || panic!(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 357 | | "Generated reward curve approximation doesn't fit into [0, 1] -> [0, 1] \ [INFO] [stdout] 358 | | because of point: [INFO] [stdout] 359 | | x = {:07} per million [INFO] [stdout] 360 | | y = {:07} per million", [INFO] [stdout] 361 | | x, y [INFO] [stdout] 362 | | )); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: the `panic!()` macro supports formatting, so there's no need for the `format!()` macro here [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: remove the `format!(..)` macro call [INFO] [stdout] | [INFO] [stdout] 356 ~ let error = || panic!( [INFO] [stdout] 357 | "Generated reward curve approximation doesn't fit into [0, 1] -> [0, 1] \ [INFO] [stdout] ... [INFO] [stdout] 361 | x, y [INFO] [stdout] 362 ~ ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking tetsy-scale-codec v2.0.1 [INFO] [stderr] Checking tetsy-impl-codec v0.5.1 [INFO] [stderr] Checking tetcore-storage v2.1.2 [INFO] [stderr] Checking tetcore-tracing v2.1.2 [INFO] [stderr] Checking tetcore-wasm-interface v2.1.2 [INFO] [stderr] Checking arithmetic v2.1.2 [INFO] [stderr] Checking tetsy-primitive-types v0.9.1 [INFO] [stderr] Checking externalities v2.1.2 [INFO] [stderr] Checking tp-runtime-interface v2.1.2 [INFO] [stderr] Checking tetsy-memory-db v0.26.0 [INFO] [stderr] Checking tet-core v2.1.2 [INFO] [stderr] Checking tp-trie v2.1.2 [INFO] [stderr] Checking tp-keystore v2.1.2 [INFO] [stderr] Checking tp-state-machine v2.1.2 [INFO] [stderr] Checking tet-io v2.1.2 [INFO] [stderr] Checking tet-application-crypto v2.1.2 [INFO] [stderr] Checking tp-runtime v2.1.2 [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | /// const I_NPOS: PiecewiseLinear<'static> = curve!( [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | /// min_inflation: 0_025_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | /// max_inflation: 0_100_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | /// ideal_stake: 0_500_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | /// falloff: 0_050_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | /// max_piece_count: 40, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | /// test_precision: 0_005_000, [INFO] [stdout] | ^^^^^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | /// ); [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | min: 0_100_000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] = note: `#[warn(clippy::zero_prefixed_literal)]` on by default [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 207 - min: 0_100_000, [INFO] [stdout] 207 + min: 100_000, [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 207 - min: 0_100_000, [INFO] [stdout] 207 + min: 0o100_000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | max: 0_900_000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 209 - max: 0_900_000, [INFO] [stdout] 209 + max: 900_000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | min: 0_010_000, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 214 - min: 0_010_000, [INFO] [stdout] 214 + min: 10_000, [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 214 - min: 0_010_000, [INFO] [stdout] 214 + min: 0o10_000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/log.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | while !(p >= pow2!(n) * q) || !(p < pow2!(n + 1) * q) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(p < pow2!(n) * q)` [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/log.rs:49:32 [INFO] [stdout] | [INFO] [stdout] 49 | while !(p >= pow2!(n) * q) || !(p < pow2!(n + 1) * q) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(p >= pow2!(n + 1) * q)` [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: usage of a legacy numeric method [INFO] [stdout] --> src/log.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | assert!(p <= u32::max_value()/2); [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] 36 - assert!(p <= u32::max_value()/2); [INFO] [stdout] 36 + assert!(p <= u32::MAX/2); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u32` [INFO] [stdout] --> src/log.rs:55:19 [INFO] [stdout] | [INFO] [stdout] 55 | let y_num: u32 = (p - pow2!(n) * q).try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u32` [INFO] [stdout] --> src/log.rs:56:19 [INFO] [stdout] | [INFO] [stdout] 56 | let y_den: u32 = (p + pow2!(n) * q).try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/log.rs:79:18 [INFO] [stdout] | [INFO] [stdout] 79 | let p: u32 = (1_000_000 as u64 * p as u64 / div as u64).try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `1_000_000_u64` [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 integer literal to `u64` is unnecessary [INFO] [stdout] --> src/log.rs:80:18 [INFO] [stdout] | [INFO] [stdout] 80 | let q: u32 = (1_000_000 as u64 * q as u64 / div as u64).try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `1_000_000_u64` [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 integer literal to `f64` is unnecessary [INFO] [stdout] --> src/log.rs:83:53 [INFO] [stdout] | [INFO] [stdout] 83 | let expected = ((q as f64 / p as f64).log(2.0) * 1_000_000 as f64).round() as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `1_000_000_f64` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/log.rs:126:31 [INFO] [stdout] | [INFO] [stdout] 126 | assert!((log2(p, q) as i32 - expected as i32).abs() < tolerance); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `expected` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:161:17 [INFO] [stdout] | [INFO] [stdout] 161 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:162:26 [INFO] [stdout] | [INFO] [stdout] 162 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:163:37 [INFO] [stdout] | [INFO] [stdout] 163 | let value_lit = syn::LitInt::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:178:31 [INFO] [stdout] | [INFO] [stdout] 178 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:179:35 [INFO] [stdout] | [INFO] [stdout] 179 | let ident = ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:180:27 [INFO] [stdout] | [INFO] [stdout] 180 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:181:32 [INFO] [stdout] | [INFO] [stdout] 181 | let typ = ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:182:27 [INFO] [stdout] | [INFO] [stdout] 182 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:183:27 [INFO] [stdout] | [INFO] [stdout] 183 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:184:27 [INFO] [stdout] | [INFO] [stdout] 184 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/lib.rs:186:27 [INFO] [stdout] | [INFO] [stdout] 186 | ::parse(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: usage of a legacy numeric method [INFO] [stdout] --> src/lib.rs:277:11 [INFO] [stdout] | [INFO] [stdout] 277 | return u32::max_value(); [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] 277 - return u32::max_value(); [INFO] [stdout] 277 + return u32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `proc_macro2::TokenStream` [INFO] [stdout] --> src/lib.rs:395:2 [INFO] [stdout] | [INFO] [stdout] 395 | / quote!( [INFO] [stdout] 396 | | #[cfg(test)] [INFO] [stdout] 397 | | mod __noble_staking_reward_curve_test_module { [INFO] [stdout] 398 | | fn i_npos(x: f64) -> f64 { [INFO] [stdout] ... | [INFO] [stdout] 445 | | ).into() [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 395 ~ quote!( [INFO] [stdout] 396 ~ #[cfg(test)] [INFO] [stdout] 397 ~ mod __noble_staking_reward_curve_test_module { [INFO] [stdout] 398 ~ fn i_npos(x: f64) -> f64 { [INFO] [stdout] 399 ~ if x <= #x_ideal { [INFO] [stdout] 400 ~ #i_0 + x * (#i_ideal - #i_0 / #x_ideal) [INFO] [stdout] 401 ~ } else { [INFO] [stdout] 402 ~ #i_0 + (#i_ideal_times_x_ideal - #i_0) * 2_f64.powf((#x_ideal - x) / #d) [INFO] [stdout] 403 ~ } [INFO] [stdout] 404 ~ } [INFO] [stdout] 405 + [INFO] [stdout] 406 ~ const MILLION: u32 = 1_000_000; [INFO] [stdout] 407 + [INFO] [stdout] 408 ~ #[test] [INFO] [stdout] 409 ~ fn reward_curve_precision() { [INFO] [stdout] 410 ~ for &base in [MILLION, u32::max_value()].iter() { [INFO] [stdout] 411 ~ let number_of_check = 100_000.min(base); [INFO] [stdout] 412 ~ for check_index in 0..=number_of_check { [INFO] [stdout] 413 ~ let i = (check_index as u64 * base as u64 / number_of_check as u64) as u32; [INFO] [stdout] 414 ~ let x = i as f64 / base as f64; [INFO] [stdout] 415 ~ let float_res = (i_npos(x) * base as f64).round() as u32; [INFO] [stdout] 416 ~ let int_res = super::#ident.calculate_for_fraction_times_denominator(i, base); [INFO] [stdout] 417 ~ let err = ( [INFO] [stdout] 418 ~ (float_res.max(int_res) - float_res.min(int_res)) as u64 [INFO] [stdout] 419 ~ * MILLION as u64 [INFO] [stdout] 420 ~ / float_res as u64 [INFO] [stdout] 421 ~ ) as u32; [INFO] [stdout] 422 ~ if err > #precision { [INFO] [stdout] 423 ~ panic!(format!("\n\ [INFO] [stdout] 424 ~ Generated reward curve approximation differ from real one:\n\t\ [INFO] [stdout] 425 ~ for i = {} and base = {}, f(i/base) * base = {},\n\t\ [INFO] [stdout] 426 ~ but approximation = {},\n\t\ [INFO] [stdout] 427 ~ err = {:07} millionth,\n\t\ [INFO] [stdout] 428 ~ try increase the number of segment: {} or the test_error: {}.\n", [INFO] [stdout] 429 ~ i, base, float_res, int_res, err, #max_piece_count, #precision [INFO] [stdout] 430 ~ )); [INFO] [stdout] 431 ~ } [INFO] [stdout] 432 ~ } [INFO] [stdout] 433 ~ } [INFO] [stdout] 434 ~ } [INFO] [stdout] 435 + [INFO] [stdout] 436 ~ #[test] [INFO] [stdout] 437 ~ fn reward_curve_piece_count() { [INFO] [stdout] 438 ~ assert!( [INFO] [stdout] 439 ~ super::#ident.points.len() as u32 - 1 <= #max_piece_count, [INFO] [stdout] 440 ~ "Generated reward curve approximation is invalid: \ [INFO] [stdout] 441 ~ has more points than specified, please fill an issue." [INFO] [stdout] 442 ~ ); [INFO] [stdout] 443 ~ } [INFO] [stdout] 444 ~ } [INFO] [stdout] 445 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/lib.rs:356:25 [INFO] [stdout] | [INFO] [stdout] 356 | let error = || panic!(format!( [INFO] [stdout] | _______________________________^ [INFO] [stdout] 357 | | "Generated reward curve approximation doesn't fit into [0, 1] -> [0, 1] \ [INFO] [stdout] 358 | | because of point: [INFO] [stdout] 359 | | x = {:07} per million [INFO] [stdout] 360 | | y = {:07} per million", [INFO] [stdout] 361 | | x, y [INFO] [stdout] 362 | | )); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: the `panic!()` macro supports formatting, so there's no need for the `format!()` macro here [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: remove the `format!(..)` macro call [INFO] [stdout] | [INFO] [stdout] 356 ~ let error = || panic!( [INFO] [stdout] 357 | "Generated reward curve approximation doesn't fit into [0, 1] -> [0, 1] \ [INFO] [stdout] ... [INFO] [stdout] 361 | x, y [INFO] [stdout] 362 ~ ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 41.62s [INFO] running `Command { std: "docker" "inspect" "e65517bc164d81afc4e33ec6782211f61780d6d81bdcf651cc85dde2f8e884e8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e65517bc164d81afc4e33ec6782211f61780d6d81bdcf651cc85dde2f8e884e8", kill_on_drop: false }` [INFO] [stdout] e65517bc164d81afc4e33ec6782211f61780d6d81bdcf651cc85dde2f8e884e8