[INFO] cloning repository https://github.com/karolko9/Liquidity-Pool-Math-Model-Simulation [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/karolko9/Liquidity-Pool-Math-Model-Simulation" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkarolko9%2FLiquidity-Pool-Math-Model-Simulation", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkarolko9%2FLiquidity-Pool-Math-Model-Simulation'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d6eea4b876c009165c52e196365fa0642543ed43 [INFO] checking karolko9/Liquidity-Pool-Math-Model-Simulation against master#068609ce766e55d2e7371cd2a86143a6d7e8e2e4 for pr-138952 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkarolko9%2FLiquidity-Pool-Math-Model-Simulation" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/karolko9/Liquidity-Pool-Math-Model-Simulation on toolchain 068609ce766e55d2e7371cd2a86143a6d7e8e2e4 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+068609ce766e55d2e7371cd2a86143a6d7e8e2e4" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/karolko9/Liquidity-Pool-Math-Model-Simulation [INFO] finished tweaking git repo https://github.com/karolko9/Liquidity-Pool-Math-Model-Simulation [INFO] tweaked toml for git repo https://github.com/karolko9/Liquidity-Pool-Math-Model-Simulation written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/karolko9/Liquidity-Pool-Math-Model-Simulation 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" "+068609ce766e55d2e7371cd2a86143a6d7e8e2e4" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [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:4b26683ee3c49f365255c425c23003cbf4366de097804722c29c5bbbee3624d2" "/opt/rustwide/cargo-home/bin/cargo" "+068609ce766e55d2e7371cd2a86143a6d7e8e2e4" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] bc76c958d308f863ae1458449436950c65e2c4858e3dfcb73955481b3c9f3386 [INFO] running `Command { std: "docker" "start" "-a" "bc76c958d308f863ae1458449436950c65e2c4858e3dfcb73955481b3c9f3386", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "bc76c958d308f863ae1458449436950c65e2c4858e3dfcb73955481b3c9f3386", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bc76c958d308f863ae1458449436950c65e2c4858e3dfcb73955481b3c9f3386", kill_on_drop: false }` [INFO] [stdout] bc76c958d308f863ae1458449436950c65e2c4858e3dfcb73955481b3c9f3386 [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:4b26683ee3c49f365255c425c23003cbf4366de097804722c29c5bbbee3624d2" "/opt/rustwide/cargo-home/bin/cargo" "+068609ce766e55d2e7371cd2a86143a6d7e8e2e4" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ccd44624325faa6c570121567f660c51f72aa9c6adc8c928df7e9fb98826e3ef [INFO] running `Command { std: "docker" "start" "-a" "ccd44624325faa6c570121567f660c51f72aa9c6adc8c928df7e9fb98826e3ef", kill_on_drop: false }` [INFO] [stderr] Checking Liquidity-Pool-Math-Model v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/main.rs:43:29 [INFO] [stdout] | [INFO] [stdout] 43 | let minted_lp = (lp_ratio * token_amount.0/ PRECISION); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 43 - let minted_lp = (lp_ratio * token_amount.0/ PRECISION); [INFO] [stdout] 43 + let minted_lp = lp_ratio * token_amount.0/ PRECISION; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/main.rs:43:29 [INFO] [stdout] | [INFO] [stdout] 43 | let minted_lp = (lp_ratio * token_amount.0/ PRECISION); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 43 - let minted_lp = (lp_ratio * token_amount.0/ PRECISION); [INFO] [stdout] 43 + let minted_lp = lp_ratio * token_amount.0/ PRECISION; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TokenAmount` is never constructed [INFO] [stdout] --> src/main.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct TokenAmount(u64); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `StakedTokenAmount` is never constructed [INFO] [stdout] --> src/main.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | struct StakedTokenAmount(u64); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LpTokenAmount` is never constructed [INFO] [stdout] --> src/main.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct LpTokenAmount(u64); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Price` is never constructed [INFO] [stdout] --> src/main.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Price(u64); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Percentage` is never constructed [INFO] [stdout] --> src/main.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Percentage(u64); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `PRECISION` is never used [INFO] [stdout] --> src/main.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | const PRECISION: u64 = 1_000_000; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LpPool` is never constructed [INFO] [stdout] --> src/main.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct LpPool { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `init`, `add_liquidity`, `remove_liquidity`, and `swap` are never used [INFO] [stdout] --> src/main.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl LpPool { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 21 | pub fn init(price: Price, min_fee: Percentage, max_fee: Percentage, liquidity_target: TokenAmount) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn add_liquidity(&mut self, token_amount: TokenAmount) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn remove_liquidity(&mut self, lp_token_amount: LpTokenAmount) -> Result<(TokenAmount, StakedTokenAmount), &'static str> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn swap(&mut self, staked_token_amount: StakedTokenAmount) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | let mut pool = LpPool::init(Price(1_500000), Percentage(1000), Percentage(90000), TokenAmount(90_000000)).unwrap(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s [INFO] running `Command { std: "docker" "inspect" "ccd44624325faa6c570121567f660c51f72aa9c6adc8c928df7e9fb98826e3ef", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ccd44624325faa6c570121567f660c51f72aa9c6adc8c928df7e9fb98826e3ef", kill_on_drop: false }` [INFO] [stdout] ccd44624325faa6c570121567f660c51f72aa9c6adc8c928df7e9fb98826e3ef