[INFO] fetching crate starknet_ekubo_sdk 0.3.0... [INFO] linting starknet_ekubo_sdk-0.3.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate starknet_ekubo_sdk 0.3.0 into /workspace/builds/worker-6-tc1/source [INFO] started tweaking crates.io crate starknet_ekubo_sdk 0.3.0 [INFO] finished tweaking crates.io crate starknet_ekubo_sdk 0.3.0 [INFO] tweaked toml for crates.io crate starknet_ekubo_sdk 0.3.0 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate starknet_ekubo_sdk 0.3.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] crate crates.io crate starknet_ekubo_sdk 0.3.0 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] Downloading crates ... [INFO] [stderr] Downloaded quote v1.0.39 [INFO] [stderr] Downloaded syn v2.0.99 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 5ebd5d0872bf1cd879a82d498a1c30fb241e5096ddfa4f55e572156f80db0522 [INFO] running `Command { std: "docker" "start" "-a" "5ebd5d0872bf1cd879a82d498a1c30fb241e5096ddfa4f55e572156f80db0522", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5ebd5d0872bf1cd879a82d498a1c30fb241e5096ddfa4f55e572156f80db0522", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5ebd5d0872bf1cd879a82d498a1c30fb241e5096ddfa4f55e572156f80db0522", kill_on_drop: false }` [INFO] [stdout] 5ebd5d0872bf1cd879a82d498a1c30fb241e5096ddfa4f55e572156f80db0522 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] ddd11888cb213f20e327d191207336d93c21ab623ff4670bafab22cad5946112 [INFO] running `Command { std: "docker" "start" "-a" "ddd11888cb213f20e327d191207336d93c21ab623ff4670bafab22cad5946112", kill_on_drop: false }` [INFO] [stderr] Compiling crunchy v0.2.2 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Checking uint v0.10.0 [INFO] [stderr] Checking starknet_ekubo_sdk v0.3.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/math/swap.rs:179:13 [INFO] [stdout] | [INFO] [stdout] 179 | calculated_amount: calculated_amount, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `calculated_amount` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `U256` which implements the `Copy` trait [INFO] [stdout] --> src/math/delta.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | TWO_POW_128.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `TWO_POW_128` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/math/muldiv.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / uint::construct_uint! { [INFO] [stdout] 11 | | struct U512(8); [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] = note: this warning originates in the macro `$crate::construct_uint` which comes from the expansion of the macro `uint::construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/math/tick.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | if tick < MIN_TICK || tick > MAX_TICK { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(MIN_TICK..=MAX_TICK).contains(&tick)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `U256` which implements the `Copy` trait [INFO] [stdout] --> src/math/tick.rs:51:21 [INFO] [stdout] | [INFO] [stdout] 51 | let mut ratio = ONE_X128.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ONE_X128` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/math/uint.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / uint::construct_uint! { [INFO] [stdout] 2 | | pub struct U256(4); [INFO] [stdout] 3 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: this warning originates in the macro `$crate::construct_uint` which comes from the expansion of the macro `uint::construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/quoting/base_pool.rs:198:12 [INFO] [stdout] | [INFO] [stdout] 198 | if !(key.token0 < key.token1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(key.token0 >= key.token1)` [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/quoting/base_pool.rs:220:20 [INFO] [stdout] | [INFO] [stdout] 220 | if !(tick.index > last) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(tick.index <= last)` [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/quoting/base_pool.rs:272:16 [INFO] [stdout] | [INFO] [stdout] 272 | if !(active_tick_sqrt_ratio <= state.sqrt_ratio) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(active_tick_sqrt_ratio > state.sqrt_ratio)` [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/quoting/base_pool.rs:280:20 [INFO] [stdout] | [INFO] [stdout] 280 | if !(state.sqrt_ratio <= first_tick_sqrt_ratio) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(state.sqrt_ratio > first_tick_sqrt_ratio)` [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: using `clone` on type `BasePoolState` which implements the `Copy` trait [INFO] [stdout] --> src/quoting/base_pool.rs:488:13 [INFO] [stdout] | [INFO] [stdout] 488 | self.state.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/quoting/base_pool.rs:616:25 [INFO] [stdout] | [INFO] [stdout] 616 | liquidity = liquidity + next_tick.liquidity_delta.unsigned_abs(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `liquidity += next_tick.liquidity_delta.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/quoting/base_pool.rs:618:25 [INFO] [stdout] | [INFO] [stdout] 618 | liquidity = liquidity - next_tick.liquidity_delta.unsigned_abs(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `liquidity -= next_tick.liquidity_delta.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/quoting/limit_order_pool.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | if !maybe_last.map_or(true, |(_, count)| !count.is_zero()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 113 - if !maybe_last.map_or(true, |(_, count)| !count.is_zero()) { [INFO] [stdout] 113 + if !maybe_last.is_none_or(|(_, count)| !count.is_zero()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/quoting/limit_order_pool.rs:432:19 [INFO] [stdout] | [INFO] [stdout] 432 | sorted_ticks: &Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 432 - sorted_ticks: &Vec, [INFO] [stdout] 432 + sorted_ticks: &[Tick], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/quoting/oracle_pool.rs:80:38 [INFO] [stdout] | [INFO] [stdout] 80 | let signed_liquidity: i128 = active_liquidity [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 81 | | .to_i128() [INFO] [stdout] 82 | | .ok_or_else(|| OraclePoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [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] 82 - .ok_or_else(|| OraclePoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [INFO] [stdout] 82 + .ok_or(OraclePoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/quoting/twamm_pool.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | / pub fn new( [INFO] [stdout] 101 | | token0: U256, [INFO] [stdout] 102 | | token1: U256, [INFO] [stdout] 103 | | fee: u128, [INFO] [stdout] ... | [INFO] [stdout] 110 | | virtual_order_deltas: Vec, [INFO] [stdout] 111 | | ) -> Result { [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/quoting/twamm_pool.rs:112:38 [INFO] [stdout] | [INFO] [stdout] 112 | let signed_liquidity: i128 = active_liquidity [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 113 | | .to_i128() [INFO] [stdout] 114 | | .ok_or_else(|| TwammPoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [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] 114 - .ok_or_else(|| TwammPoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [INFO] [stdout] 114 + .ok_or(TwammPoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/quoting/twamm_pool.rs:350:17 [INFO] [stdout] | [INFO] [stdout] 350 | / base_pool_execution_resources = [INFO] [stdout] 351 | | base_pool_execution_resources + quote.execution_resources; [INFO] [stdout] | |_____________________________________________________________________________^ help: replace it with: `base_pool_execution_resources += quote.execution_resources` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/quoting/util.rs:118:28 [INFO] [stdout] | [INFO] [stdout] 118 | let has_min_tick = result.first().map_or(false, |t| t.index == valid_min_tick); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 118 - let has_min_tick = result.first().map_or(false, |t| t.index == valid_min_tick); [INFO] [stdout] 118 + let has_min_tick = result.first().is_some_and(|t| t.index == valid_min_tick); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/quoting/util.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 135 | let has_max_tick = result.last().map_or(false, |t| t.index == valid_max_tick); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 135 - let has_max_tick = result.last().map_or(false, |t| t.index == valid_max_tick); [INFO] [stdout] 135 + let has_max_tick = result.last().is_some_and(|t| t.index == valid_max_tick); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/math/swap.rs:179:13 [INFO] [stdout] | [INFO] [stdout] 179 | calculated_amount: calculated_amount, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `calculated_amount` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `U256` which implements the `Copy` trait [INFO] [stdout] --> src/math/delta.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | TWO_POW_128.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `TWO_POW_128` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/math/muldiv.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / uint::construct_uint! { [INFO] [stdout] 11 | | struct U512(8); [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] = note: this warning originates in the macro `$crate::construct_uint` which comes from the expansion of the macro `uint::construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/math/tick.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | if tick < MIN_TICK || tick > MAX_TICK { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(MIN_TICK..=MAX_TICK).contains(&tick)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `U256` which implements the `Copy` trait [INFO] [stdout] --> src/math/tick.rs:51:21 [INFO] [stdout] | [INFO] [stdout] 51 | let mut ratio = ONE_X128.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ONE_X128` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/math/uint.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / uint::construct_uint! { [INFO] [stdout] 2 | | pub struct U256(4); [INFO] [stdout] 3 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: this warning originates in the macro `$crate::construct_uint` which comes from the expansion of the macro `uint::construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/quoting/base_pool.rs:198:12 [INFO] [stdout] | [INFO] [stdout] 198 | if !(key.token0 < key.token1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(key.token0 >= key.token1)` [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/quoting/base_pool.rs:220:20 [INFO] [stdout] | [INFO] [stdout] 220 | if !(tick.index > last) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(tick.index <= last)` [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/quoting/base_pool.rs:272:16 [INFO] [stdout] | [INFO] [stdout] 272 | if !(active_tick_sqrt_ratio <= state.sqrt_ratio) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(active_tick_sqrt_ratio > state.sqrt_ratio)` [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/quoting/base_pool.rs:280:20 [INFO] [stdout] | [INFO] [stdout] 280 | if !(state.sqrt_ratio <= first_tick_sqrt_ratio) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(state.sqrt_ratio > first_tick_sqrt_ratio)` [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: using `clone` on type `BasePoolState` which implements the `Copy` trait [INFO] [stdout] --> src/quoting/base_pool.rs:488:13 [INFO] [stdout] | [INFO] [stdout] 488 | self.state.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/quoting/base_pool.rs:616:25 [INFO] [stdout] | [INFO] [stdout] 616 | liquidity = liquidity + next_tick.liquidity_delta.unsigned_abs(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `liquidity += next_tick.liquidity_delta.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/quoting/base_pool.rs:618:25 [INFO] [stdout] | [INFO] [stdout] 618 | liquidity = liquidity - next_tick.liquidity_delta.unsigned_abs(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `liquidity -= next_tick.liquidity_delta.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/quoting/limit_order_pool.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | if !maybe_last.map_or(true, |(_, count)| !count.is_zero()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 113 - if !maybe_last.map_or(true, |(_, count)| !count.is_zero()) { [INFO] [stdout] 113 + if !maybe_last.is_none_or(|(_, count)| !count.is_zero()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/quoting/limit_order_pool.rs:432:19 [INFO] [stdout] | [INFO] [stdout] 432 | sorted_ticks: &Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 432 - sorted_ticks: &Vec, [INFO] [stdout] 432 + sorted_ticks: &[Tick], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/quoting/limit_order_pool.rs:515:36 [INFO] [stdout] | [INFO] [stdout] 515 | ... index: LIMIT_ORDER_TICK_SPACING * -1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-LIMIT_ORDER_TICK_SPACING` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/quoting/limit_order_pool.rs:893:28 [INFO] [stdout] | [INFO] [stdout] 893 | index: -1 * LIMIT_ORDER_TICK_SPACING, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-LIMIT_ORDER_TICK_SPACING` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/quoting/limit_order_pool.rs:902:28 [INFO] [stdout] | [INFO] [stdout] 902 | index: 1 * LIMIT_ORDER_TICK_SPACING, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `LIMIT_ORDER_TICK_SPACING` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/quoting/limit_order_pool.rs:1025:28 [INFO] [stdout] | [INFO] [stdout] 1025 | index: -1 * LIMIT_ORDER_TICK_SPACING, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-LIMIT_ORDER_TICK_SPACING` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/quoting/limit_order_pool.rs:1034:28 [INFO] [stdout] | [INFO] [stdout] 1034 | index: 1 * LIMIT_ORDER_TICK_SPACING, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `LIMIT_ORDER_TICK_SPACING` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/quoting/oracle_pool.rs:80:38 [INFO] [stdout] | [INFO] [stdout] 80 | let signed_liquidity: i128 = active_liquidity [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 81 | | .to_i128() [INFO] [stdout] 82 | | .ok_or_else(|| OraclePoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [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] 82 - .ok_or_else(|| OraclePoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [INFO] [stdout] 82 + .ok_or(OraclePoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/quoting/twamm_pool.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | / pub fn new( [INFO] [stdout] 101 | | token0: U256, [INFO] [stdout] 102 | | token1: U256, [INFO] [stdout] 103 | | fee: u128, [INFO] [stdout] ... | [INFO] [stdout] 110 | | virtual_order_deltas: Vec, [INFO] [stdout] 111 | | ) -> Result { [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/quoting/twamm_pool.rs:112:38 [INFO] [stdout] | [INFO] [stdout] 112 | let signed_liquidity: i128 = active_liquidity [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 113 | | .to_i128() [INFO] [stdout] 114 | | .ok_or_else(|| TwammPoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [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] 114 - .ok_or_else(|| TwammPoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [INFO] [stdout] 114 + .ok_or(TwammPoolError::ActiveLiquidityDoesNotFitSignedInteger)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/quoting/twamm_pool.rs:350:17 [INFO] [stdout] | [INFO] [stdout] 350 | / base_pool_execution_resources = [INFO] [stdout] 351 | | base_pool_execution_resources + quote.execution_resources; [INFO] [stdout] | |_____________________________________________________________________________^ help: replace it with: `base_pool_execution_resources += quote.execution_resources` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/quoting/util.rs:118:28 [INFO] [stdout] | [INFO] [stdout] 118 | let has_min_tick = result.first().map_or(false, |t| t.index == valid_min_tick); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 118 - let has_min_tick = result.first().map_or(false, |t| t.index == valid_min_tick); [INFO] [stdout] 118 + let has_min_tick = result.first().is_some_and(|t| t.index == valid_min_tick); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/quoting/util.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 135 | let has_max_tick = result.last().map_or(false, |t| t.index == valid_max_tick); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 135 - let has_max_tick = result.last().map_or(false, |t| t.index == valid_max_tick); [INFO] [stdout] 135 + let has_max_tick = result.last().is_some_and(|t| t.index == valid_max_tick); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/quoting/util.rs:167:56 [INFO] [stdout] | [INFO] [stdout] 167 | assert_eq!(find_nearest_initialized_tick_index(&vec![], 0), None); [INFO] [stdout] | ^^^^^^^ help: you can use a slice directly: `&[]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/quoting/util.rs:174:17 [INFO] [stdout] | [INFO] [stdout] 174 | / &vec![Tick { [INFO] [stdout] 175 | | index: -1, [INFO] [stdout] 176 | | liquidity_delta: 1, [INFO] [stdout] 177 | | }], [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 174 ~ &[Tick { [INFO] [stdout] 175 + index: -1, [INFO] [stdout] 176 + liquidity_delta: 1, [INFO] [stdout] 177 ~ }], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/quoting/util.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | / &vec![Tick { [INFO] [stdout] 189 | | index: 0, [INFO] [stdout] 190 | | liquidity_delta: 1, [INFO] [stdout] 191 | | }], [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 188 ~ &[Tick { [INFO] [stdout] 189 + index: 0, [INFO] [stdout] 190 + liquidity_delta: 1, [INFO] [stdout] 191 ~ }], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/quoting/util.rs:202:17 [INFO] [stdout] | [INFO] [stdout] 202 | / &vec![Tick { [INFO] [stdout] 203 | | index: 1, [INFO] [stdout] 204 | | liquidity_delta: 1, [INFO] [stdout] 205 | | }], [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 202 ~ &[Tick { [INFO] [stdout] 203 + index: 1, [INFO] [stdout] 204 + liquidity_delta: 1, [INFO] [stdout] 205 ~ }], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.75s [INFO] running `Command { std: "docker" "inspect" "ddd11888cb213f20e327d191207336d93c21ab623ff4670bafab22cad5946112", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ddd11888cb213f20e327d191207336d93c21ab623ff4670bafab22cad5946112", kill_on_drop: false }` [INFO] [stdout] ddd11888cb213f20e327d191207336d93c21ab623ff4670bafab22cad5946112