[INFO] cloning repository https://github.com/gallynaut/serum-twap [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/gallynaut/serum-twap" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgallynaut%2Fserum-twap", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgallynaut%2Fserum-twap'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] debe975c7649103b86f17f71e6b03b7c9cfc52bb [INFO] linting gallynaut/serum-twap against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgallynaut%2Fserum-twap" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/gallynaut/serum-twap [INFO] finished tweaking git repo https://github.com/gallynaut/serum-twap [INFO] tweaked toml for git repo https://github.com/gallynaut/serum-twap written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/gallynaut/serum-twap 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 git repo https://github.com/gallynaut/serum-twap 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 tokio-macros v1.2.0 [INFO] [stderr] Downloaded hyper v0.14.9 [INFO] [stderr] Downloaded tokio v1.7.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] f0d476caedcd3d62e8658b8f94b74d6bba3563ceb65de2a086a1e809d0a32de8 [INFO] running `Command { std: "docker" "start" "-a" "f0d476caedcd3d62e8658b8f94b74d6bba3563ceb65de2a086a1e809d0a32de8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f0d476caedcd3d62e8658b8f94b74d6bba3563ceb65de2a086a1e809d0a32de8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f0d476caedcd3d62e8658b8f94b74d6bba3563ceb65de2a086a1e809d0a32de8", kill_on_drop: false }` [INFO] [stdout] f0d476caedcd3d62e8658b8f94b74d6bba3563ceb65de2a086a1e809d0a32de8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 8476fed9871465dcde255de90e4cd50f3e3b8540f7cd0e46c459052332363160 [INFO] running `Command { std: "docker" "start" "-a" "8476fed9871465dcde255de90e4cd50f3e3b8540f7cd0e46c459052332363160", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.97 [INFO] [stderr] Compiling syn v1.0.73 [INFO] [stderr] Compiling tokio v1.7.1 [INFO] [stderr] Checking instant v0.1.9 [INFO] [stderr] Checking lock_api v0.4.4 [INFO] [stderr] Compiling futures-task v0.3.15 [INFO] [stderr] Compiling futures-util v0.3.15 [INFO] [stderr] Compiling indexmap v1.6.2 [INFO] [stderr] Compiling futures-channel v0.3.15 [INFO] [stderr] Compiling miniz_oxide v0.4.4 [INFO] [stderr] Compiling backtrace v0.3.60 [INFO] [stderr] Checking gimli v0.24.0 [INFO] [stderr] Compiling error-chain v0.12.4 [INFO] [stderr] Checking object v0.25.3 [INFO] [stderr] Checking rustc-demangle v0.1.20 [INFO] [stderr] Checking parking_lot_core v0.8.3 [INFO] [stderr] Checking num_cpus v1.13.0 [INFO] [stderr] Checking mio v0.7.13 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking openssl-sys v0.9.65 [INFO] [stderr] Checking socket2 v0.4.0 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking time v0.1.44 [INFO] [stderr] Checking clap v2.33.3 [INFO] [stderr] Checking parking_lot v0.11.1 [INFO] [stderr] Checking chrono v0.4.19 [INFO] [stderr] Checking openssl v0.10.35 [INFO] [stderr] Checking addr2line v0.15.2 [INFO] [stderr] Compiling tokio-macros v1.2.0 [INFO] [stderr] Compiling serde_derive v1.0.126 [INFO] [stderr] Checking native-tls v0.2.7 [INFO] [stderr] Checking serde v1.0.126 [INFO] [stderr] Checking tokio-util v0.6.7 [INFO] [stderr] Checking tokio-native-tls v0.3.0 [INFO] [stderr] Checking h2 v0.3.3 [INFO] [stderr] Checking serde_json v1.0.64 [INFO] [stderr] Checking serde_urlencoded v0.7.0 [INFO] [stderr] Checking hyper v0.14.9 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.4 [INFO] [stderr] Checking serum-twap v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: field `volume` is never read [INFO] [stdout] --> src/main.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct OHLC { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 15 | volume: Option, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OHLC` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `print` is never used [INFO] [stdout] --> src/main.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 17 | impl OHLC { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 27 | fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `market`, `size`, `side`, `order_id`, `fee_cost`, and `market_address` are never read [INFO] [stdout] --> src/main.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 70 | pub struct MarketData { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 71 | market: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 72 | price: f64, [INFO] [stdout] 73 | size: f64, [INFO] [stdout] | ^^^^ [INFO] [stdout] 74 | side: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 75 | time: f64, [INFO] [stdout] 76 | order_id: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 77 | fee_cost: f64, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 78 | market_address: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MarketData` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `success` is never read [INFO] [stdout] --> src/main.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 142 | struct GetMarketsResponse { [INFO] [stdout] | ------------------ field in this struct [INFO] [stdout] 143 | success: bool, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GetMarketsResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `interval` and `debug` are never read [INFO] [stdout] --> src/config.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Config { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 6 | pub symbol: String, [INFO] [stdout] 7 | pub interval: Duration, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 8 | pub debug: bool, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | if self.open == None || self.high == None || self.low == None || self.close == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.open.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:40:33 [INFO] [stdout] | [INFO] [stdout] 40 | if self.open == None || self.high == None || self.low == None || self.close == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.high.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:40:54 [INFO] [stdout] | [INFO] [stdout] 40 | if self.open == None || self.high == None || self.low == None || self.close == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.low.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:40:74 [INFO] [stdout] | [INFO] [stdout] 40 | if self.open == None || self.high == None || self.low == None || self.close == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.close.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `volume` is never read [INFO] [stdout] --> src/main.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct OHLC { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 15 | volume: Option, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OHLC` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `print` is never used [INFO] [stdout] --> src/main.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 17 | impl OHLC { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 27 | fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `market`, `size`, `side`, `order_id`, `fee_cost`, and `market_address` are never read [INFO] [stdout] --> src/main.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 70 | pub struct MarketData { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 71 | market: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 72 | price: f64, [INFO] [stdout] 73 | size: f64, [INFO] [stdout] | ^^^^ [INFO] [stdout] 74 | side: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 75 | time: f64, [INFO] [stdout] 76 | order_id: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 77 | fee_cost: f64, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 78 | market_address: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MarketData` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `success` is never read [INFO] [stdout] --> src/main.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 142 | struct GetMarketsResponse { [INFO] [stdout] | ------------------ field in this struct [INFO] [stdout] 143 | success: bool, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GetMarketsResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `interval` and `debug` are never read [INFO] [stdout] --> src/config.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Config { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 6 | pub symbol: String, [INFO] [stdout] 7 | pub interval: Duration, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 8 | pub debug: bool, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:111:16 [INFO] [stdout] | [INFO] [stdout] 111 | if x.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:115:31 [INFO] [stdout] | [INFO] [stdout] 115 | candles[i].open = match x.iter().last() { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 116 | | Some(i) => Some(i.price), [INFO] [stdout] 117 | | None => None, [INFO] [stdout] 118 | | }; [INFO] [stdout] | |_____________^ help: try: `x.iter().last().map(|i| i.price)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:119:32 [INFO] [stdout] | [INFO] [stdout] 119 | candles[i].close = match x.iter().next() { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 120 | | Some(i) => Some(i.price), [INFO] [stdout] 121 | | None => None, [INFO] [stdout] 122 | | }; [INFO] [stdout] | |_____________^ help: try: `x.iter().next().map(|i| i.price)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:128:20 [INFO] [stdout] | [INFO] [stdout] 128 | if high == None || y.price > high.unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^ help: use `Option::is_none()` instead: `high.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:131:20 [INFO] [stdout] | [INFO] [stdout] 131 | if low == None || y.price < low.unwrap() { [INFO] [stdout] | ^^^^^^^^^^^ help: use `Option::is_none()` instead: `low.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:182:5 [INFO] [stdout] | [INFO] [stdout] 182 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:196:5 [INFO] [stdout] | [INFO] [stdout] 196 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:202:13 [INFO] [stdout] | [INFO] [stdout] 202 | let q = format!("https://serum-api.bonfida.com/pairs"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"https://serum-api.bonfida.com/pairs".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | if self.open == None || self.high == None || self.low == None || self.close == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.open.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:40:33 [INFO] [stdout] | [INFO] [stdout] 40 | if self.open == None || self.high == None || self.low == None || self.close == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.high.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:40:54 [INFO] [stdout] | [INFO] [stdout] 40 | if self.open == None || self.high == None || self.low == None || self.close == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.low.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:40:74 [INFO] [stdout] | [INFO] [stdout] 40 | if self.open == None || self.high == None || self.low == None || self.close == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.close.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/main.rs:211:5 [INFO] [stdout] | [INFO] [stdout] 211 | let _ = res.unwrap().print_markets(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 211 - let _ = res.unwrap().print_markets(); [INFO] [stdout] 211 + res.unwrap().print_markets(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:231:12 [INFO] [stdout] | [INFO] [stdout] 231 | if !next_candle.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_candle.is_some()` [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/main.rs:232:16 [INFO] [stdout] | [INFO] [stdout] 232 | if !prev_candle.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `prev_candle.is_some()` [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/main.rs:238:16 [INFO] [stdout] | [INFO] [stdout] 238 | if !prev_candle.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `prev_candle.is_some()` [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: called `unwrap` on `next_candle` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:233:34 [INFO] [stdout] | [INFO] [stdout] 231 | if !next_candle.is_none() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 232 | if !prev_candle.is_none() { [INFO] [stdout] 233 | new_candles[i] = next_candle.unwrap().interpolate(prev_candle.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `prev_candle` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:233:67 [INFO] [stdout] | [INFO] [stdout] 232 | if !prev_candle.is_none() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 233 | new_candles[i] = next_candle.unwrap().interpolate(prev_candle.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `next_candle` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:235:34 [INFO] [stdout] | [INFO] [stdout] 231 | if !next_candle.is_none() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 235 | new_candles[i] = next_candle.unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `prev_candle` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:239:34 [INFO] [stdout] | [INFO] [stdout] 238 | if !prev_candle.is_none() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 239 | new_candles[i] = prev_candle.unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `OHLC` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:220:30 [INFO] [stdout] | [INFO] [stdout] 220 | new_candles[i] = c.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [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: using `clone` on type `OHLC` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:225:32 [INFO] [stdout] | [INFO] [stdout] 225 | next_candle = Some(candles[i + 1].clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `candles[i + 1]` [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: using `clone` on type `OHLC` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:229:32 [INFO] [stdout] | [INFO] [stdout] 229 | prev_candle = Some(candles[i - 1].clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `candles[i - 1]` [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: length comparison to zero [INFO] [stdout] --> src/main.rs:111:16 [INFO] [stdout] | [INFO] [stdout] 111 | if x.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:115:31 [INFO] [stdout] | [INFO] [stdout] 115 | candles[i].open = match x.iter().last() { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 116 | | Some(i) => Some(i.price), [INFO] [stdout] 117 | | None => None, [INFO] [stdout] 118 | | }; [INFO] [stdout] | |_____________^ help: try: `x.iter().last().map(|i| i.price)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:119:32 [INFO] [stdout] | [INFO] [stdout] 119 | candles[i].close = match x.iter().next() { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 120 | | Some(i) => Some(i.price), [INFO] [stdout] 121 | | None => None, [INFO] [stdout] 122 | | }; [INFO] [stdout] | |_____________^ help: try: `x.iter().next().map(|i| i.price)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:128:20 [INFO] [stdout] | [INFO] [stdout] 128 | if high == None || y.price > high.unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^ help: use `Option::is_none()` instead: `high.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:131:20 [INFO] [stdout] | [INFO] [stdout] 131 | if low == None || y.price < low.unwrap() { [INFO] [stdout] | ^^^^^^^^^^^ help: use `Option::is_none()` instead: `low.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:182:5 [INFO] [stdout] | [INFO] [stdout] 182 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:196:5 [INFO] [stdout] | [INFO] [stdout] 196 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:202:13 [INFO] [stdout] | [INFO] [stdout] 202 | let q = format!("https://serum-api.bonfida.com/pairs"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"https://serum-api.bonfida.com/pairs".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/main.rs:211:5 [INFO] [stdout] | [INFO] [stdout] 211 | let _ = res.unwrap().print_markets(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 211 - let _ = res.unwrap().print_markets(); [INFO] [stdout] 211 + res.unwrap().print_markets(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:231:12 [INFO] [stdout] | [INFO] [stdout] 231 | if !next_candle.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_candle.is_some()` [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/main.rs:232:16 [INFO] [stdout] | [INFO] [stdout] 232 | if !prev_candle.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `prev_candle.is_some()` [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/main.rs:238:16 [INFO] [stdout] | [INFO] [stdout] 238 | if !prev_candle.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `prev_candle.is_some()` [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: called `unwrap` on `next_candle` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:233:34 [INFO] [stdout] | [INFO] [stdout] 231 | if !next_candle.is_none() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 232 | if !prev_candle.is_none() { [INFO] [stdout] 233 | new_candles[i] = next_candle.unwrap().interpolate(prev_candle.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `prev_candle` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:233:67 [INFO] [stdout] | [INFO] [stdout] 232 | if !prev_candle.is_none() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 233 | new_candles[i] = next_candle.unwrap().interpolate(prev_candle.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `next_candle` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:235:34 [INFO] [stdout] | [INFO] [stdout] 231 | if !next_candle.is_none() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 235 | new_candles[i] = next_candle.unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `prev_candle` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:239:34 [INFO] [stdout] | [INFO] [stdout] 238 | if !prev_candle.is_none() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 239 | new_candles[i] = prev_candle.unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `OHLC` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:220:30 [INFO] [stdout] | [INFO] [stdout] 220 | new_candles[i] = c.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [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: using `clone` on type `OHLC` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:225:32 [INFO] [stdout] | [INFO] [stdout] 225 | next_candle = Some(candles[i + 1].clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `candles[i + 1]` [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: using `clone` on type `OHLC` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:229:32 [INFO] [stdout] | [INFO] [stdout] 229 | prev_candle = Some(candles[i - 1].clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `candles[i - 1]` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 20.86s [INFO] running `Command { std: "docker" "inspect" "8476fed9871465dcde255de90e4cd50f3e3b8540f7cd0e46c459052332363160", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8476fed9871465dcde255de90e4cd50f3e3b8540f7cd0e46c459052332363160", kill_on_drop: false }` [INFO] [stdout] 8476fed9871465dcde255de90e4cd50f3e3b8540f7cd0e46c459052332363160