[INFO] cloning repository https://github.com/nanvel/scalper-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/nanvel/scalper-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnanvel%2Fscalper-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnanvel%2Fscalper-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 267735ffb6cda5b23dac1b0541ddc7878c22b83f [INFO] linting nanvel/scalper-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnanvel%2Fscalper-rs" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/nanvel/scalper-rs [INFO] finished tweaking git repo https://github.com/nanvel/scalper-rs [INFO] tweaked toml for git repo https://github.com/nanvel/scalper-rs written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/nanvel/scalper-rs 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/nanvel/scalper-rs already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded yeslogic-fontconfig-sys v6.0.0 [INFO] [stderr] Downloaded lyon_geom v1.0.17 [INFO] [stderr] Downloaded sw-composite v0.7.16 [INFO] [stderr] Downloaded float-ord v0.3.2 [INFO] [stderr] Downloaded f64-fixed v0.2.1 [INFO] [stderr] Downloaded dwrote v0.11.5 [INFO] [stderr] Downloaded core-text v20.1.0 [INFO] [stderr] Downloaded console v0.16.1 [INFO] [stderr] Downloaded pathfinder_simd v0.5.5 [INFO] [stderr] Downloaded clap v4.5.51 [INFO] [stderr] Downloaded font-kit v0.14.3 [INFO] [stderr] Downloaded minifb v0.28.0 [INFO] [stderr] Downloaded flate2 v1.1.4 [INFO] [stderr] Downloaded raqote v0.8.5 [INFO] [stderr] Downloaded clap_builder v4.5.51 [INFO] [stderr] Downloaded rustls v0.23.33 [INFO] [stderr] Downloaded syn v2.0.107 [INFO] [stderr] Downloaded freetype-sys v0.20.1 [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] 015ecd20034f5010716c58093eaad3a7c48753d89e26e021ca17a5c86fe6b91b [INFO] running `Command { std: "docker" "start" "-a" "015ecd20034f5010716c58093eaad3a7c48753d89e26e021ca17a5c86fe6b91b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "015ecd20034f5010716c58093eaad3a7c48753d89e26e021ca17a5c86fe6b91b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "015ecd20034f5010716c58093eaad3a7c48753d89e26e021ca17a5c86fe6b91b", kill_on_drop: false }` [INFO] [stdout] 015ecd20034f5010716c58093eaad3a7c48753d89e26e021ca17a5c86fe6b91b [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] 3d54b44285437e7f0d5823954bf81a9962f0e8c5bb9067603f06d8d89b9fc9d0 [INFO] running `Command { std: "docker" "start" "-a" "3d54b44285437e7f0d5823954bf81a9962f0e8c5bb9067603f06d8d89b9fc9d0", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.177 [INFO] [stderr] Compiling cc v1.2.41 [INFO] [stderr] Checking stable_deref_trait v1.2.1 [INFO] [stderr] Compiling syn v2.0.107 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Checking libloading v0.8.9 [INFO] [stderr] Compiling wayland-scanner v0.29.5 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Compiling openssl v0.10.74 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Compiling wayland-sys v0.29.5 [INFO] [stderr] Compiling semver v1.0.27 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Compiling rustc_version v0.4.1 [INFO] [stderr] Compiling alsa-sys v0.3.1 [INFO] [stderr] Compiling yeslogic-fontconfig-sys v6.0.0 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Compiling cpal v0.15.3 [INFO] [stderr] Compiling font-kit v0.14.3 [INFO] [stderr] Checking flate2 v1.1.4 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Compiling pathfinder_simd v0.5.5 [INFO] [stderr] Checking euclid v0.22.11 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Compiling openssl-sys v0.9.110 [INFO] [stderr] Compiling wayland-client v0.29.5 [INFO] [stderr] Compiling freetype-sys v0.20.1 [INFO] [stderr] Compiling wayland-protocols v0.29.5 [INFO] [stderr] Checking pathfinder_geometry v0.5.1 [INFO] [stderr] Compiling minifb v0.28.0 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking dasp_sample v0.11.0 [INFO] [stderr] Checking iri-string v0.7.8 [INFO] [stderr] Checking winnow v0.7.13 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking signal-hook-registry v1.4.6 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking mio v1.1.0 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking nix v0.24.3 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking alsa v0.9.1 [INFO] [stderr] Checking dirs v6.0.0 [INFO] [stderr] Checking float-ord v0.3.2 [INFO] [stderr] Checking data-encoding v2.9.0 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Checking x11-dl v2.21.0 [INFO] [stderr] Checking toml_parser v1.0.4 [INFO] [stderr] Checking wayland-commons v0.29.5 [INFO] [stderr] Checking clap_builder v4.5.51 [INFO] [stderr] Checking lyon_geom v1.0.17 [INFO] [stderr] Checking rustls-pki-types v1.12.0 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking serde_json v1.0.145 [INFO] [stderr] Checking serde_spanned v1.0.3 [INFO] [stderr] Checking toml_datetime v0.7.3 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking toml_writer v1.0.4 [INFO] [stderr] Checking raw-window-handle v0.6.2 [INFO] [stderr] Checking sw-composite v0.7.16 [INFO] [stderr] Checking wayland-cursor v0.29.5 [INFO] [stderr] Checking console v0.16.1 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking toml v0.9.8 [INFO] [stderr] Checking raqote v0.8.5 [INFO] [stderr] Checking rodio v0.17.3 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking f64-fixed v0.2.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.4 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.3 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking tungstenite v0.28.0 [INFO] [stderr] Checking clap v4.5.51 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking rust_decimal v1.39.0 [INFO] [stderr] Checking tokio-util v0.7.16 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking tokio-tungstenite v0.28.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking h2 v0.4.12 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking tower-http v0.6.6 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking hyper v1.7.0 [INFO] [stderr] Checking hyper-util v0.1.17 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.24 [INFO] [stderr] Checking scalper-rs v1.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/exchanges/base/client.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | pub const USER_AGENT: &'static str = "scalper-rs/0.1"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/exchanges/base/client.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | pub const USER_AGENT: &'static str = "scalper-rs/0.1"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `orders_sender_clone` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | let orders_sender_clone = self.orders_sender.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_orders_sender_clone` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `access_key_clone` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | let access_key_clone = self.access_key.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_access_key_clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `secret_key_clone` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | let secret_key_clone = self.secret_key.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_secret_key_clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `orders_sender_clone` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | let orders_sender_clone = self.orders_sender.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_orders_sender_clone` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `access_key_clone` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | let access_key_clone = self.access_key.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_access_key_clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `secret_key_clone` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | let secret_key_clone = self.secret_key.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_secret_key_clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `access_key` and `secret_key` are never read [INFO] [stdout] --> src/exchanges/binance_spot/client.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct BinanceClient { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 17 | access_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 18 | secret_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/exchanges/binance_spot/client.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 23 | impl BinanceClient { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn has_auth(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | async fn get_signed( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 115 | async fn post_signed( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | async fn put_signed( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 183 | async fn delete_signed( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 217 | async fn post_with_api_key(&self, endpoint: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 235 | async fn put_with_api_key(&self, endpoint: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `orders_sender` is never read [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct BinanceSpotExchange { [INFO] [stdout] | ------------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 20 | orders_sender: Sender, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `access_key` and `secret_key` are never read [INFO] [stdout] --> src/exchanges/binance_us_spot/client.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct BinanceClient { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 17 | access_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 18 | secret_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/exchanges/binance_us_spot/client.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 23 | impl BinanceClient { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn has_auth(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | async fn get_signed( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 115 | async fn post_signed( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | async fn put_signed( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 183 | async fn delete_signed( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 217 | async fn post_with_api_key(&self, endpoint: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 235 | async fn put_with_api_key(&self, endpoint: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `orders_sender` is never read [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct BinanceUSSpotExchange { [INFO] [stdout] | --------------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 20 | orders_sender: Sender, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `algo_id` is never read [INFO] [stdout] --> src/exchanges/binance_usd_futures/client.rs:641:9 [INFO] [stdout] | [INFO] [stdout] 639 | pub struct BinanceCancelStopOrder { [INFO] [stdout] | ---------------------- field in this struct [INFO] [stdout] 640 | #[serde(rename = "algoId")] [INFO] [stdout] 641 | pub algo_id: u64, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `HmacSha512` is never used [INFO] [stdout] --> src/exchanges/gateio_usd_futures/client.rs:15:6 [INFO] [stdout] | [INFO] [stdout] 15 | type HmacSha512 = Hmac; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `access_key` and `secret_key` are never read [INFO] [stdout] --> src/exchanges/gateio_usd_futures/client.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct GateioClient { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 21 | access_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 22 | secret_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AuthError` is never constructed [INFO] [stdout] --> src/exchanges/gateio_usd_futures/client.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 27 | pub enum GateioError { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 31 | AuthError(String), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GateioError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/exchanges/gateio_usd_futures/client.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 57 | impl GateioClient { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 69 | pub fn has_auth(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | fn get_timestamp() -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 80 | fn sign_request( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 148 | async fn get_signed( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 193 | async fn post_signed(&self, endpoint: &str, body: String) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 230 | async fn delete_signed( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 348 | pub fn get_contract_stats_sync(&self, limit: usize) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `theme`, `text_dark`, `text_negative_pnl`, `text_positive_pnl`, and `text_error` are never read [INFO] [stdout] --> src/models/color_schema.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct ColorSchema { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 20 | pub theme: Theme, [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub text_dark: Color, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 36 | pub text_negative_pnl: Color, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 37 | pub text_positive_pnl: Color, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 38 | pub text_error: Color, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/exchanges/binance_spot/client.rs:357:5 [INFO] [stdout] | [INFO] [stdout] 357 | / PriceFilter { [INFO] [stdout] 358 | | #[serde(rename = "tickSize")] [INFO] [stdout] 359 | | tick_size: String, [INFO] [stdout] 360 | | }, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:114:23 [INFO] [stdout] | [INFO] [stdout] 114 | fn stop(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:125:47 [INFO] [stdout] | [INFO] [stdout] 125 | fn set_interval(&self, interval: Interval) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:135:31 [INFO] [stdout] | [INFO] [stdout] 135 | .get_candles_sync(&interval_str, self.candles_limit) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `interval_str` [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: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:147:48 [INFO] [stdout] | [INFO] [stdout] 147 | fn place_order(&self, _new_order: NewOrder) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:155:42 [INFO] [stdout] | [INFO] [stdout] 155 | fn cancel_order(&self, _order: Order) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/exchanges/binance_spot/market_stream.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | symbol: &String, [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] 14 - symbol: &String, [INFO] [stdout] 14 + symbol: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `access_key` and `secret_key` are never read [INFO] [stdout] --> src/exchanges/binance_spot/client.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct BinanceClient { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 17 | access_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 18 | secret_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/exchanges/binance_spot/client.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 23 | impl BinanceClient { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn has_auth(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | async fn get_signed( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 115 | async fn post_signed( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | async fn put_signed( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 183 | async fn delete_signed( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 217 | async fn post_with_api_key(&self, endpoint: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 235 | async fn put_with_api_key(&self, endpoint: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `orders_sender` is never read [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct BinanceSpotExchange { [INFO] [stdout] | ------------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 20 | orders_sender: Sender, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `access_key` and `secret_key` are never read [INFO] [stdout] --> src/exchanges/binance_us_spot/client.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct BinanceClient { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 17 | access_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 18 | secret_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/exchanges/binance_us_spot/client.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 23 | impl BinanceClient { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn has_auth(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | async fn get_signed( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 115 | async fn post_signed( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | async fn put_signed( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 183 | async fn delete_signed( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 217 | async fn post_with_api_key(&self, endpoint: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 235 | async fn put_with_api_key(&self, endpoint: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `orders_sender` is never read [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct BinanceUSSpotExchange { [INFO] [stdout] | --------------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 20 | orders_sender: Sender, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `algo_id` is never read [INFO] [stdout] --> src/exchanges/binance_usd_futures/client.rs:641:9 [INFO] [stdout] | [INFO] [stdout] 639 | pub struct BinanceCancelStopOrder { [INFO] [stdout] | ---------------------- field in this struct [INFO] [stdout] 640 | #[serde(rename = "algoId")] [INFO] [stdout] 641 | pub algo_id: u64, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `HmacSha512` is never used [INFO] [stdout] --> src/exchanges/gateio_usd_futures/client.rs:15:6 [INFO] [stdout] | [INFO] [stdout] 15 | type HmacSha512 = Hmac; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `access_key` and `secret_key` are never read [INFO] [stdout] --> src/exchanges/gateio_usd_futures/client.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct GateioClient { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 21 | access_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 22 | secret_key: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `AuthError` is never constructed [INFO] [stdout] --> src/exchanges/gateio_usd_futures/client.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 27 | pub enum GateioError { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 31 | AuthError(String), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GateioError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/exchanges/gateio_usd_futures/client.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 57 | impl GateioClient { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 69 | pub fn has_auth(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | fn get_timestamp() -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 80 | fn sign_request( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 148 | async fn get_signed( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 193 | async fn post_signed(&self, endpoint: &str, body: String) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 230 | async fn delete_signed( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 348 | pub fn get_contract_stats_sync(&self, limit: usize) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `theme`, `text_dark`, `text_negative_pnl`, `text_positive_pnl`, and `text_error` are never read [INFO] [stdout] --> src/models/color_schema.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct ColorSchema { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 20 | pub theme: Theme, [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub text_dark: Color, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 36 | pub text_negative_pnl: Color, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 37 | pub text_positive_pnl: Color, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 38 | pub text_error: Color, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/exchanges/binance_us_spot/client.rs:357:5 [INFO] [stdout] | [INFO] [stdout] 357 | / PriceFilter { [INFO] [stdout] 358 | | #[serde(rename = "tickSize")] [INFO] [stdout] 359 | | tick_size: String, [INFO] [stdout] 360 | | }, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/exchanges/binance_spot/client.rs:357:5 [INFO] [stdout] | [INFO] [stdout] 357 | / PriceFilter { [INFO] [stdout] 358 | | #[serde(rename = "tickSize")] [INFO] [stdout] 359 | | tick_size: String, [INFO] [stdout] 360 | | }, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:114:23 [INFO] [stdout] | [INFO] [stdout] 114 | fn stop(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:125:47 [INFO] [stdout] | [INFO] [stdout] 125 | fn set_interval(&self, interval: Interval) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:135:31 [INFO] [stdout] | [INFO] [stdout] 135 | .get_candles_sync(&interval_str, self.candles_limit) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `interval_str` [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: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:147:48 [INFO] [stdout] | [INFO] [stdout] 147 | fn place_order(&self, _new_order: NewOrder) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:155:42 [INFO] [stdout] | [INFO] [stdout] 155 | fn cancel_order(&self, _order: Order) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/exchanges/binance_us_spot/market_stream.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | symbol: &String, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - symbol: &String, [INFO] [stdout] 14 + symbol: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:114:23 [INFO] [stdout] | [INFO] [stdout] 114 | fn stop(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:125:47 [INFO] [stdout] | [INFO] [stdout] 125 | fn set_interval(&self, interval: Interval) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:135:31 [INFO] [stdout] | [INFO] [stdout] 135 | .get_candles_sync(&interval_str, self.candles_limit) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `interval_str` [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: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:147:48 [INFO] [stdout] | [INFO] [stdout] 147 | fn place_order(&self, _new_order: NewOrder) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_spot/exchange.rs:155:42 [INFO] [stdout] | [INFO] [stdout] 155 | fn cancel_order(&self, _order: Order) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/exchanges/binance_spot/market_stream.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | symbol: &String, [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] 14 - symbol: &String, [INFO] [stdout] 14 + symbol: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Decimal` which implements the `Copy` trait [INFO] [stdout] --> src/exchanges/binance_usd_futures/client.rs:534:20 [INFO] [stdout] | [INFO] [stdout] 534 | price: order.price.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `order.price` [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: variant name ends with the enum's name [INFO] [stdout] --> src/exchanges/binance_us_spot/client.rs:357:5 [INFO] [stdout] | [INFO] [stdout] 357 | / PriceFilter { [INFO] [stdout] 358 | | #[serde(rename = "tickSize")] [INFO] [stdout] 359 | | tick_size: String, [INFO] [stdout] 360 | | }, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/exchanges/binance_usd_futures/client.rs:580:5 [INFO] [stdout] | [INFO] [stdout] 580 | / PriceFilter { [INFO] [stdout] 581 | | #[serde(rename = "tickSize")] [INFO] [stdout] 582 | | tick_size: String, [INFO] [stdout] 583 | | }, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:114:23 [INFO] [stdout] | [INFO] [stdout] 114 | fn stop(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:125:47 [INFO] [stdout] | [INFO] [stdout] 125 | fn set_interval(&self, interval: Interval) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:135:31 [INFO] [stdout] | [INFO] [stdout] 135 | .get_candles_sync(&interval_str, self.candles_limit) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `interval_str` [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: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:147:48 [INFO] [stdout] | [INFO] [stdout] 147 | fn place_order(&self, _new_order: NewOrder) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_us_spot/exchange.rs:155:42 [INFO] [stdout] | [INFO] [stdout] 155 | fn cancel_order(&self, _order: Order) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/exchanges/binance_us_spot/market_stream.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | symbol: &String, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - symbol: &String, [INFO] [stdout] 14 + symbol: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_usd_futures/exchange.rs:144:23 [INFO] [stdout] | [INFO] [stdout] 144 | fn stop(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_usd_futures/exchange.rs:155:47 [INFO] [stdout] | [INFO] [stdout] 155 | fn set_interval(&self, interval: Interval) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/exchanges/binance_usd_futures/exchange.rs:165:31 [INFO] [stdout] | [INFO] [stdout] 165 | .get_candles_sync(&interval_str, self.candles_limit) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `interval_str` [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: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_usd_futures/exchange.rs:177:47 [INFO] [stdout] | [INFO] [stdout] 177 | fn place_order(&self, new_order: NewOrder) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_usd_futures/exchange.rs:201:41 [INFO] [stdout] | [INFO] [stdout] 201 | fn cancel_order(&self, order: Order) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/exchanges/binance_usd_futures/market_stream.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | symbol: &String, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - symbol: &String, [INFO] [stdout] 14 + symbol: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Decimal` which implements the `Copy` trait [INFO] [stdout] --> src/exchanges/binance_usd_futures/client.rs:534:20 [INFO] [stdout] | [INFO] [stdout] 534 | price: order.price.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `order.price` [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: variant name ends with the enum's name [INFO] [stdout] --> src/exchanges/binance_usd_futures/client.rs:580:5 [INFO] [stdout] | [INFO] [stdout] 580 | / PriceFilter { [INFO] [stdout] 581 | | #[serde(rename = "tickSize")] [INFO] [stdout] 582 | | tick_size: String, [INFO] [stdout] 583 | | }, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/binance_usd_futures/orders_stream.rs:44:33 [INFO] [stdout] | [INFO] [stdout] 44 | / ... if let Ok(er) = serde_json::from_value::(candidate) [INFO] [stdout] 45 | | ... { [INFO] [stdout] 46 | | ... if let Some(sym) = &er.symbol { [INFO] [stdout] 47 | | ... if sym.eq_ignore_ascii_case(&symbol) { [INFO] [stdout] ... | [INFO] [stdout] 51 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 44 ~ if let Ok(er) = serde_json::from_value::(candidate) [INFO] [stdout] 45 ~ && let Some(sym) = &er.symbol { [INFO] [stdout] 46 | if sym.eq_ignore_ascii_case(&symbol) { [INFO] [stdout] 47 | process_filled_order(&er, &orders_sender) [INFO] [stdout] 48 | } [INFO] [stdout] 49 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/binance_usd_futures/orders_stream.rs:46:37 [INFO] [stdout] | [INFO] [stdout] 46 | / ... if let Some(sym) = &er.symbol { [INFO] [stdout] 47 | | ... if sym.eq_ignore_ascii_case(&symbol) { [INFO] [stdout] 48 | | ... process_filled_order(&er, &orders_sender) [INFO] [stdout] 49 | | ... } [INFO] [stdout] 50 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 46 ~ if let Some(sym) = &er.symbol [INFO] [stdout] 47 ~ && sym.eq_ignore_ascii_case(&symbol) { [INFO] [stdout] 48 | process_filled_order(&er, &orders_sender) [INFO] [stdout] 49 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/exchanges/binance_usd_futures/orders_stream.rs:47:69 [INFO] [stdout] | [INFO] [stdout] 47 | ... if sym.eq_ignore_ascii_case(&symbol) { [INFO] [stdout] | ^^^^^^^ help: change this to: `symbol` [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 `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/binance_usd_futures/orders_stream.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(t) = &er.order_type { [INFO] [stdout] 88 | | if let Some(s) = &er.current_order_status { [INFO] [stdout] 89 | | if t.eq("STOP_MARKET") && s.eq("EXPIRED") { [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(t) = &er.order_type [INFO] [stdout] 88 ~ && let Some(s) = &er.current_order_status { [INFO] [stdout] 89 | if t.eq("STOP_MARKET") && s.eq("EXPIRED") { [INFO] [stdout] ... [INFO] [stdout] 92 | } [INFO] [stdout] 93 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/binance_usd_futures/orders_stream.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | / if let Some(s) = &er.current_order_status { [INFO] [stdout] 89 | | if t.eq("STOP_MARKET") && s.eq("EXPIRED") { [INFO] [stdout] 90 | | // STOP_MARKET -> MARKET [INFO] [stdout] 91 | | return; [INFO] [stdout] 92 | | } [INFO] [stdout] 93 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 88 ~ if let Some(s) = &er.current_order_status [INFO] [stdout] 89 ~ && t.eq("STOP_MARKET") && s.eq("EXPIRED") { [INFO] [stdout] 90 | // STOP_MARKET -> MARKET [INFO] [stdout] 91 | return; [INFO] [stdout] 92 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/client.rs:27:1 [INFO] [stdout] | [INFO] [stdout] 27 | / pub enum GateioError { [INFO] [stdout] 28 | | ReqwestError(reqwest::Error), [INFO] [stdout] 29 | | ParseError(String), [INFO] [stdout] 30 | | ApiError { label: String, message: String }, [INFO] [stdout] 31 | | AuthError(String), [INFO] [stdout] 32 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_usd_futures/exchange.rs:144:23 [INFO] [stdout] | [INFO] [stdout] 144 | fn stop(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_usd_futures/exchange.rs:155:47 [INFO] [stdout] | [INFO] [stdout] 155 | fn set_interval(&self, interval: Interval) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/exchanges/binance_usd_futures/exchange.rs:165:31 [INFO] [stdout] | [INFO] [stdout] 165 | .get_candles_sync(&interval_str, self.candles_limit) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `interval_str` [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: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_usd_futures/exchange.rs:177:47 [INFO] [stdout] | [INFO] [stdout] 177 | fn place_order(&self, new_order: NewOrder) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/binance_usd_futures/exchange.rs:201:41 [INFO] [stdout] | [INFO] [stdout] 201 | fn cancel_order(&self, order: Order) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/exchanges/binance_usd_futures/market_stream.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | symbol: &String, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - symbol: &String, [INFO] [stdout] 14 + symbol: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:123:23 [INFO] [stdout] | [INFO] [stdout] 123 | fn stop(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:134:47 [INFO] [stdout] | [INFO] [stdout] 134 | fn set_interval(&self, interval: Interval) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:144:31 [INFO] [stdout] | [INFO] [stdout] 144 | .get_candles_sync(&interval_str, self.candles_limit) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `interval_str` [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: unneeded unit return type [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:156:48 [INFO] [stdout] | [INFO] [stdout] 156 | fn place_order(&self, _new_order: NewOrder) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:164:42 [INFO] [stdout] | [INFO] [stdout] 164 | fn cancel_order(&self, _order: Order) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/market_stream.rs:73:14 [INFO] [stdout] | [INFO] [stdout] 73 | .filter_map(|a| { [INFO] [stdout] | ______________^ [INFO] [stdout] 74 | | let price = Decimal::from_str(&a.p).unwrap(); [INFO] [stdout] 75 | | let qty = Decimal::from(a.s); [INFO] [stdout] 76 | | Some((price, qty)) [INFO] [stdout] 77 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/market_stream.rs:82:14 [INFO] [stdout] | [INFO] [stdout] 82 | .filter_map(|b| { [INFO] [stdout] | ______________^ [INFO] [stdout] 83 | | let price = Decimal::from_str(&b.p).unwrap(); [INFO] [stdout] 84 | | let qty = Decimal::from(b.s); [INFO] [stdout] 85 | | Some((price, qty)) [INFO] [stdout] 86 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/gateio_usd_futures/market_stream.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | / if let Ok(wrapper) = serde_json::from_str::(&text) { [INFO] [stdout] 97 | | if wrapper.event == "update" { [INFO] [stdout] 98 | | match wrapper.channel.as_str() { [INFO] [stdout] 99 | | "futures.order_book_update" => { [INFO] [stdout] ... | [INFO] [stdout] 158 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 96 ~ if let Ok(wrapper) = serde_json::from_str::(&text) [INFO] [stdout] 97 ~ && wrapper.event == "update" { [INFO] [stdout] 98 | match wrapper.channel.as_str() { [INFO] [stdout] ... [INFO] [stdout] 156 | } [INFO] [stdout] 157 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/gateio_usd_futures/market_stream.rs:100:33 [INFO] [stdout] | [INFO] [stdout] 100 | / ... if let Ok(event) = [INFO] [stdout] 101 | | ... serde_json::from_value::(wrapper.result) [INFO] [stdout] 102 | | ... { [INFO] [stdout] 103 | | ... if event.first_update_id >= depth_snapshot.id { [INFO] [stdout] ... | [INFO] [stdout] 106 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 101 ~ serde_json::from_value::(wrapper.result) [INFO] [stdout] 102 ~ && event.first_update_id >= depth_snapshot.id { [INFO] [stdout] 103 | apply_order_book_update(&shared_dom_state, &event); [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/gateio_usd_futures/market_stream.rs:130:33 [INFO] [stdout] | [INFO] [stdout] 130 | / ... if let Ok(events) = [INFO] [stdout] 131 | | ... serde_json::from_value::>(wrapper.result) [INFO] [stdout] 132 | | ... { [INFO] [stdout] 133 | | ... if let Some(event) = events.first() { [INFO] [stdout] ... | [INFO] [stdout] 153 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 131 ~ serde_json::from_value::>(wrapper.result) [INFO] [stdout] 132 ~ && let Some(event) = events.first() { [INFO] [stdout] 133 | let candle = Candle { [INFO] [stdout] ... [INFO] [stdout] 150 | } [INFO] [stdout] 151 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/binance_usd_futures/orders_stream.rs:44:33 [INFO] [stdout] | [INFO] [stdout] 44 | / ... if let Ok(er) = serde_json::from_value::(candidate) [INFO] [stdout] 45 | | ... { [INFO] [stdout] 46 | | ... if let Some(sym) = &er.symbol { [INFO] [stdout] 47 | | ... if sym.eq_ignore_ascii_case(&symbol) { [INFO] [stdout] ... | [INFO] [stdout] 51 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 44 ~ if let Ok(er) = serde_json::from_value::(candidate) [INFO] [stdout] 45 ~ && let Some(sym) = &er.symbol { [INFO] [stdout] 46 | if sym.eq_ignore_ascii_case(&symbol) { [INFO] [stdout] 47 | process_filled_order(&er, &orders_sender) [INFO] [stdout] 48 | } [INFO] [stdout] 49 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/binance_usd_futures/orders_stream.rs:46:37 [INFO] [stdout] | [INFO] [stdout] 46 | / ... if let Some(sym) = &er.symbol { [INFO] [stdout] 47 | | ... if sym.eq_ignore_ascii_case(&symbol) { [INFO] [stdout] 48 | | ... process_filled_order(&er, &orders_sender) [INFO] [stdout] 49 | | ... } [INFO] [stdout] 50 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 46 ~ if let Some(sym) = &er.symbol [INFO] [stdout] 47 ~ && sym.eq_ignore_ascii_case(&symbol) { [INFO] [stdout] 48 | process_filled_order(&er, &orders_sender) [INFO] [stdout] 49 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/exchanges/binance_usd_futures/orders_stream.rs:47:69 [INFO] [stdout] | [INFO] [stdout] 47 | ... if sym.eq_ignore_ascii_case(&symbol) { [INFO] [stdout] | ^^^^^^^ help: change this to: `symbol` [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 `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/binance_usd_futures/orders_stream.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(t) = &er.order_type { [INFO] [stdout] 88 | | if let Some(s) = &er.current_order_status { [INFO] [stdout] 89 | | if t.eq("STOP_MARKET") && s.eq("EXPIRED") { [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(t) = &er.order_type [INFO] [stdout] 88 ~ && let Some(s) = &er.current_order_status { [INFO] [stdout] 89 | if t.eq("STOP_MARKET") && s.eq("EXPIRED") { [INFO] [stdout] ... [INFO] [stdout] 92 | } [INFO] [stdout] 93 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/binance_usd_futures/orders_stream.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | / if let Some(s) = &er.current_order_status { [INFO] [stdout] 89 | | if t.eq("STOP_MARKET") && s.eq("EXPIRED") { [INFO] [stdout] 90 | | // STOP_MARKET -> MARKET [INFO] [stdout] 91 | | return; [INFO] [stdout] 92 | | } [INFO] [stdout] 93 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 88 ~ if let Some(s) = &er.current_order_status [INFO] [stdout] 89 ~ && t.eq("STOP_MARKET") && s.eq("EXPIRED") { [INFO] [stdout] 90 | // STOP_MARKET -> MARKET [INFO] [stdout] 91 | return; [INFO] [stdout] 92 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/client.rs:27:1 [INFO] [stdout] | [INFO] [stdout] 27 | / pub enum GateioError { [INFO] [stdout] 28 | | ReqwestError(reqwest::Error), [INFO] [stdout] 29 | | ParseError(String), [INFO] [stdout] 30 | | ApiError { label: String, message: String }, [INFO] [stdout] 31 | | AuthError(String), [INFO] [stdout] 32 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Alert` which implements the `Copy` trait [INFO] [stdout] --> src/models/alerts.rs:44:44 [INFO] [stdout] | [INFO] [stdout] 44 | self.last_triggered = Some(alert.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*alert` [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 `Alert` which implements the `Copy` trait [INFO] [stdout] --> src/models/alerts.rs:45:39 [INFO] [stdout] | [INFO] [stdout] 45 | triggered_alerts.push(alert.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*alert` [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: items after a test module [INFO] [stdout] --> src/models/candles.rs:138:1 [INFO] [stdout] | [INFO] [stdout] 138 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 227 | pub type SharedCandlesState = Arc>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/candles.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if let Some(last_candle) = self.last() { [INFO] [stdout] 54 | | if last_candle.open_time == candle.open_time { [INFO] [stdout] 55 | | // Update existing candle [INFO] [stdout] 56 | | let index = (self.head + self.capacity - 1) % self.capacity; [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if let Some(last_candle) = self.last() [INFO] [stdout] 54 ~ && last_candle.open_time == candle.open_time { [INFO] [stdout] 55 | // Update existing candle [INFO] [stdout] ... [INFO] [stdout] 58 | return; [INFO] [stdout] 59 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/models/color_schema.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / impl Default for Theme { [INFO] [stdout] 14 | | fn default() -> Self { [INFO] [stdout] 15 | | Theme::Dark [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub enum Theme { [INFO] [stdout] 9 | Light, [INFO] [stdout] 10 ~ #[default] [INFO] [stdout] 11 ~ Dark, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!Range::contains` implementation [INFO] [stdout] --> src/models/color_schema.rs:143:20 [INFO] [stdout] | [INFO] [stdout] 143 | if hour >= 20 || hour < 6 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(6..20).contains(&hour)` [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: unneeded unit return type [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:123:23 [INFO] [stdout] | [INFO] [stdout] 123 | fn stop(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:134:47 [INFO] [stdout] | [INFO] [stdout] 134 | fn set_interval(&self, interval: Interval) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:144:31 [INFO] [stdout] | [INFO] [stdout] 144 | .get_candles_sync(&interval_str, self.candles_limit) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `interval_str` [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: unneeded unit return type [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:156:48 [INFO] [stdout] | [INFO] [stdout] 156 | fn place_order(&self, _new_order: NewOrder) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/exchanges/gateio_usd_futures/exchange.rs:164:42 [INFO] [stdout] | [INFO] [stdout] 164 | fn cancel_order(&self, _order: Order) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/market_stream.rs:73:14 [INFO] [stdout] | [INFO] [stdout] 73 | .filter_map(|a| { [INFO] [stdout] | ______________^ [INFO] [stdout] 74 | | let price = Decimal::from_str(&a.p).unwrap(); [INFO] [stdout] 75 | | let qty = Decimal::from(a.s); [INFO] [stdout] 76 | | Some((price, qty)) [INFO] [stdout] 77 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/exchanges/gateio_usd_futures/market_stream.rs:82:14 [INFO] [stdout] | [INFO] [stdout] 82 | .filter_map(|b| { [INFO] [stdout] | ______________^ [INFO] [stdout] 83 | | let price = Decimal::from_str(&b.p).unwrap(); [INFO] [stdout] 84 | | let qty = Decimal::from(b.s); [INFO] [stdout] 85 | | Some((price, qty)) [INFO] [stdout] 86 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/gateio_usd_futures/market_stream.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | / if let Ok(wrapper) = serde_json::from_str::(&text) { [INFO] [stdout] 97 | | if wrapper.event == "update" { [INFO] [stdout] 98 | | match wrapper.channel.as_str() { [INFO] [stdout] 99 | | "futures.order_book_update" => { [INFO] [stdout] ... | [INFO] [stdout] 158 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 96 ~ if let Ok(wrapper) = serde_json::from_str::(&text) [INFO] [stdout] 97 ~ && wrapper.event == "update" { [INFO] [stdout] 98 | match wrapper.channel.as_str() { [INFO] [stdout] ... [INFO] [stdout] 156 | } [INFO] [stdout] 157 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/gateio_usd_futures/market_stream.rs:100:33 [INFO] [stdout] | [INFO] [stdout] 100 | / ... if let Ok(event) = [INFO] [stdout] 101 | | ... serde_json::from_value::(wrapper.result) [INFO] [stdout] 102 | | ... { [INFO] [stdout] 103 | | ... if event.first_update_id >= depth_snapshot.id { [INFO] [stdout] ... | [INFO] [stdout] 106 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 101 ~ serde_json::from_value::(wrapper.result) [INFO] [stdout] 102 ~ && event.first_update_id >= depth_snapshot.id { [INFO] [stdout] 103 | apply_order_book_update(&shared_dom_state, &event); [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/exchanges/gateio_usd_futures/market_stream.rs:130:33 [INFO] [stdout] | [INFO] [stdout] 130 | / ... if let Ok(events) = [INFO] [stdout] 131 | | ... serde_json::from_value::>(wrapper.result) [INFO] [stdout] 132 | | ... { [INFO] [stdout] 133 | | ... if let Some(event) = events.first() { [INFO] [stdout] ... | [INFO] [stdout] 153 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 131 ~ serde_json::from_value::>(wrapper.result) [INFO] [stdout] 132 ~ && let Some(event) = events.first() { [INFO] [stdout] 133 | let candle = Candle { [INFO] [stdout] ... [INFO] [stdout] 150 | } [INFO] [stdout] 151 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/config.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | / if let Some(sl_pnl) = config.sl_pnl { [INFO] [stdout] 125 | | if sl_pnl > Decimal::ZERO { [INFO] [stdout] 126 | | config.sl_pnl = Some(-sl_pnl); [INFO] [stdout] 127 | | } [INFO] [stdout] 128 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 124 ~ if let Some(sl_pnl) = config.sl_pnl [INFO] [stdout] 125 ~ && sl_pnl > Decimal::ZERO { [INFO] [stdout] 126 | config.sl_pnl = Some(-sl_pnl); [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/logs.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | / if self.with_sound { [INFO] [stdout] 126 | | if let Some(sound) = alert.sound { [INFO] [stdout] 127 | | let sound_clone = sound.clone(); [INFO] [stdout] 128 | | std::thread::spawn(move || { [INFO] [stdout] ... | [INFO] [stdout] 134 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 125 ~ if self.with_sound [INFO] [stdout] 126 ~ && let Some(sound) = alert.sound { [INFO] [stdout] 127 | let sound_clone = sound.clone(); [INFO] [stdout] ... [INFO] [stdout] 132 | }); [INFO] [stdout] 133 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/models/open_interest.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / match self.data.get(&(time.seconds() / 60 * 60)) { [INFO] [stdout] 28 | | Some(oi) => Some(*oi), [INFO] [stdout] 29 | | None => None, [INFO] [stdout] 30 | | } [INFO] [stdout] | |_________^ help: try: `self.data.get(&(time.seconds() / 60 * 60)).map(|oi| *oi)` [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: this function has too many arguments (11/7) [INFO] [stdout] --> src/models/orders.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / pub fn new( [INFO] [stdout] 49 | | id: String, [INFO] [stdout] 50 | | order_type: OrderType, [INFO] [stdout] 51 | | order_side: OrderSide, [INFO] [stdout] ... | [INFO] [stdout] 59 | | is_update: bool, [INFO] [stdout] 60 | | ) -> Self { [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: using `clone` on type `Alert` which implements the `Copy` trait [INFO] [stdout] --> src/models/alerts.rs:44:44 [INFO] [stdout] | [INFO] [stdout] 44 | self.last_triggered = Some(alert.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*alert` [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: this boolean expression can be simplified [INFO] [stdout] --> src/models/orders.rs:145:12 [INFO] [stdout] | [INFO] [stdout] 145 | if !bid.is_some() || !ask.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `bid.is_none()` [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/models/orders.rs:145:30 [INFO] [stdout] | [INFO] [stdout] 145 | if !bid.is_some() || !ask.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `ask.is_none()` [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 `Alert` which implements the `Copy` trait [INFO] [stdout] --> src/models/alerts.rs:45:39 [INFO] [stdout] | [INFO] [stdout] 45 | triggered_alerts.push(alert.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*alert` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/models/symbol.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 24 | / let min_qty = (self.min_notional / price) [INFO] [stdout] 25 | | .round_dp_with_strategy( [INFO] [stdout] 26 | | self.step_size.normalize().scale(), [INFO] [stdout] 27 | | rust_decimal::RoundingStrategy::ToZero, [INFO] [stdout] 28 | | ) [INFO] [stdout] 29 | | .max(self.step_size); [INFO] [stdout] | |_____________________________________- unnecessary `let` binding [INFO] [stdout] 30 | min_qty [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 24 ~ [INFO] [stdout] 25 ~ (self.min_notional / price) [INFO] [stdout] 26 + .round_dp_with_strategy( [INFO] [stdout] 27 + self.step_size.normalize().scale(), [INFO] [stdout] 28 + rust_decimal::RoundingStrategy::ToZero, [INFO] [stdout] 29 + ) [INFO] [stdout] 30 + .max(self.step_size) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/models/timestamp.rs:33:26 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn to_utc_string(&self) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/candles.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if let Some(last_candle) = self.last() { [INFO] [stdout] 54 | | if last_candle.open_time == candle.open_time { [INFO] [stdout] 55 | | // Update existing candle [INFO] [stdout] 56 | | let index = (self.head + self.capacity - 1) % self.capacity; [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if let Some(last_candle) = self.last() [INFO] [stdout] 54 ~ && last_candle.open_time == candle.open_time { [INFO] [stdout] 55 | // Update existing candle [INFO] [stdout] ... [INFO] [stdout] 58 | return; [INFO] [stdout] 59 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | / if let Some(pos) = PX_PER_TICK_CHOICES [INFO] [stdout] 83 | | .iter() [INFO] [stdout] 84 | | .position(|&x| Decimal::from_str(x).unwrap() == self.px_per_tick) [INFO] [stdout] ... | [INFO] [stdout] 90 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 84 ~ .position(|&x| Decimal::from_str(x).unwrap() == self.px_per_tick) [INFO] [stdout] 85 ~ && pos > 0 { [INFO] [stdout] 86 | self.px_per_tick = Decimal::from_str(PX_PER_TICK_CHOICES[pos - 1]).unwrap(); [INFO] [stdout] 87 | self.book_entry_range = Decimal::ZERO; [INFO] [stdout] 88 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | / if let Some(pos) = PX_PER_TICK_CHOICES [INFO] [stdout] 95 | | .iter() [INFO] [stdout] 96 | | .position(|&x| Decimal::from_str(x).unwrap() == self.px_per_tick) [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 96 ~ .position(|&x| Decimal::from_str(x).unwrap() == self.px_per_tick) [INFO] [stdout] 97 ~ && pos + 1 < PX_PER_TICK_CHOICES.len() { [INFO] [stdout] 98 | self.px_per_tick = Decimal::from_str(PX_PER_TICK_CHOICES[pos + 1]).unwrap(); [INFO] [stdout] 99 | self.book_entry_range = Decimal::ZERO; [INFO] [stdout] 100 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/renderer.rs:118:5 [INFO] [stdout] | [INFO] [stdout] 118 | / pub fn render( [INFO] [stdout] 119 | | &mut self, [INFO] [stdout] 120 | | shared_state: &SharedState, [INFO] [stdout] 121 | | trader: &Trader, [INFO] [stdout] ... | [INFO] [stdout] 126 | | force_redraw: bool, [INFO] [stdout] 127 | | ) { [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] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/models/color_schema.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / impl Default for Theme { [INFO] [stdout] 14 | | fn default() -> Self { [INFO] [stdout] 15 | | Theme::Dark [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub enum Theme { [INFO] [stdout] 9 | Light, [INFO] [stdout] 10 ~ #[default] [INFO] [stdout] 11 ~ Dark, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!Range::contains` implementation [INFO] [stdout] --> src/models/color_schema.rs:143:20 [INFO] [stdout] | [INFO] [stdout] 143 | if hour >= 20 || hour < 6 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(6..20).contains(&hour)` [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/renderer.rs:435:30 [INFO] [stdout] | [INFO] [stdout] 435 | trader.size_quote.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/renderer.rs:436:41 [INFO] [stdout] | [INFO] [stdout] 436 | trader.get_size_multiplier().to_string(), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:1059:9 [INFO] [stdout] | [INFO] [stdout] 1059 | / if max_oi > Decimal::ZERO { [INFO] [stdout] 1060 | | if !oi_diff.is_zero() { [INFO] [stdout] 1061 | | let oi_height = ((max_oi / Decimal::from(100) / oi_diff) [INFO] [stdout] 1062 | | * Decimal::from(volume_height)) [INFO] [stdout] ... | [INFO] [stdout] 1081 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1059 ~ if max_oi > Decimal::ZERO [INFO] [stdout] 1060 ~ && !oi_diff.is_zero() { [INFO] [stdout] 1061 | let oi_height = ((max_oi / Decimal::from(100) / oi_diff) [INFO] [stdout] ... [INFO] [stdout] 1079 | ); [INFO] [stdout] 1080 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/renderer.rs:1095:13 [INFO] [stdout] | [INFO] [stdout] 1095 | &interval.slug().to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `interval.slug()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/renderer.rs:1127:9 [INFO] [stdout] | [INFO] [stdout] 1127 | self.dt.get_data().iter().map(|&pixel| pixel).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.dt.get_data().iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/config.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | / if let Some(sl_pnl) = config.sl_pnl { [INFO] [stdout] 125 | | if sl_pnl > Decimal::ZERO { [INFO] [stdout] 126 | | config.sl_pnl = Some(-sl_pnl); [INFO] [stdout] 127 | | } [INFO] [stdout] 128 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 124 ~ if let Some(sl_pnl) = config.sl_pnl [INFO] [stdout] 125 ~ && sl_pnl > Decimal::ZERO { [INFO] [stdout] 126 | config.sl_pnl = Some(-sl_pnl); [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/trader.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if let Some(size) = self.get_single_size() { [INFO] [stdout] 54 | | Some(size * Decimal::from(self.get_size_multiplier())) [INFO] [stdout] 55 | | } else { [INFO] [stdout] 56 | | None [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________^ help: try: `self.get_single_size().map(|size| size * Decimal::from(self.get_size_multiplier()))` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/trader.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | / if let Some(size) = self.get_work_size() { [INFO] [stdout] 62 | | Some(NewOrder { [INFO] [stdout] 63 | | order_type: OrderType::Market, [INFO] [stdout] 64 | | order_side: OrderSide::Buy, [INFO] [stdout] ... | [INFO] [stdout] 69 | | None [INFO] [stdout] 70 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 61 ~ self.get_work_size().map(|size| NewOrder { [INFO] [stdout] 62 + order_type: OrderType::Market, [INFO] [stdout] 63 + order_side: OrderSide::Buy, [INFO] [stdout] 64 + quantity: size, [INFO] [stdout] 65 + price: None, [INFO] [stdout] 66 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/trader.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | / if let Some(size) = self.get_work_size() { [INFO] [stdout] 75 | | Some(NewOrder { [INFO] [stdout] 76 | | order_type: OrderType::Market, [INFO] [stdout] 77 | | order_side: OrderSide::Sell, [INFO] [stdout] ... | [INFO] [stdout] 82 | | None [INFO] [stdout] 83 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 74 ~ self.get_work_size().map(|size| NewOrder { [INFO] [stdout] 75 + order_type: OrderType::Market, [INFO] [stdout] 76 + order_side: OrderSide::Sell, [INFO] [stdout] 77 + quantity: size, [INFO] [stdout] 78 + price: None, [INFO] [stdout] 79 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/trader.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | / if let Some(size) = self.get_work_size() { [INFO] [stdout] 89 | | Some(NewOrder { [INFO] [stdout] 90 | | order_type: OrderType::Limit, [INFO] [stdout] 91 | | order_side: if price < bid { [INFO] [stdout] ... | [INFO] [stdout] 100 | | None [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 88 ~ self.get_work_size().map(|size| NewOrder { [INFO] [stdout] 89 + order_type: OrderType::Limit, [INFO] [stdout] 90 + order_side: if price < bid { [INFO] [stdout] 91 + OrderSide::Buy [INFO] [stdout] 92 + } else { [INFO] [stdout] 93 + OrderSide::Sell [INFO] [stdout] 94 + }, [INFO] [stdout] 95 + quantity: size, [INFO] [stdout] 96 + price: Some(price), [INFO] [stdout] 97 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/trader.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | / if let Some(size) = self.get_work_size() { [INFO] [stdout] 110 | | Some(NewOrder { [INFO] [stdout] 111 | | order_type: OrderType::Stop, [INFO] [stdout] 112 | | order_side: if price < bid { [INFO] [stdout] ... | [INFO] [stdout] 121 | | None [INFO] [stdout] 122 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 109 ~ self.get_work_size().map(|size| NewOrder { [INFO] [stdout] 110 + order_type: OrderType::Stop, [INFO] [stdout] 111 + order_side: if price < bid { [INFO] [stdout] 112 + OrderSide::Sell [INFO] [stdout] 113 + } else { [INFO] [stdout] 114 + OrderSide::Buy [INFO] [stdout] 115 + }, [INFO] [stdout] 116 + quantity: size, [INFO] [stdout] 117 + price: Some(price), [INFO] [stdout] 118 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `trader.bid` after checking its variant with `is_some` [INFO] [stdout] --> src/main.rs:126:38 [INFO] [stdout] | [INFO] [stdout] 125 | if trader.bid.is_some() && trader.ask.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 126 | for alert in alerts.scan(trader.bid.unwrap(), trader.ask.unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `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 `trader.ask` after checking its variant with `is_some` [INFO] [stdout] --> src/main.rs:126:59 [INFO] [stdout] | [INFO] [stdout] 125 | if trader.bid.is_some() && trader.ask.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 126 | for alert in alerts.scan(trader.bid.unwrap(), trader.ask.unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `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: this `if` statement can be collapsed [INFO] [stdout] --> src/models/logs.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | / if self.with_sound { [INFO] [stdout] 126 | | if let Some(sound) = alert.sound { [INFO] [stdout] 127 | | let sound_clone = sound.clone(); [INFO] [stdout] 128 | | std::thread::spawn(move || { [INFO] [stdout] ... | [INFO] [stdout] 134 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 125 ~ if self.with_sound [INFO] [stdout] 126 ~ && let Some(sound) = alert.sound { [INFO] [stdout] 127 | let sound_clone = sound.clone(); [INFO] [stdout] ... [INFO] [stdout] 132 | }); [INFO] [stdout] 133 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/models/open_interest.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / match self.data.get(&(time.seconds() / 60 * 60)) { [INFO] [stdout] 28 | | Some(oi) => Some(*oi), [INFO] [stdout] 29 | | None => None, [INFO] [stdout] 30 | | } [INFO] [stdout] | |_________^ help: try: `self.data.get(&(time.seconds() / 60 * 60)).map(|oi| *oi)` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | / if window.is_key_pressed(Key::Equal, minifb::KeyRepeat::No) { [INFO] [stdout] 166 | | if let Some(new_order) = trader.market_buy() { [INFO] [stdout] 167 | | exchange.place_order(new_order); [INFO] [stdout] 168 | | } [INFO] [stdout] 169 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 165 ~ if window.is_key_pressed(Key::Equal, minifb::KeyRepeat::No) [INFO] [stdout] 166 ~ && let Some(new_order) = trader.market_buy() { [INFO] [stdout] 167 | exchange.place_order(new_order); [INFO] [stdout] 168 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / if window.is_key_pressed(Key::Minus, minifb::KeyRepeat::No) { [INFO] [stdout] 172 | | if let Some(new_order) = trader.market_sell() { [INFO] [stdout] 173 | | exchange.place_order(new_order); [INFO] [stdout] 174 | | } [INFO] [stdout] 175 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 171 ~ if window.is_key_pressed(Key::Minus, minifb::KeyRepeat::No) [INFO] [stdout] 172 ~ && let Some(new_order) = trader.market_sell() { [INFO] [stdout] 173 | exchange.place_order(new_order); [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | / if window.is_key_pressed(Key::Key0, minifb::KeyRepeat::No) { [INFO] [stdout] 178 | | if let Some(new_order) = trader.flat() { [INFO] [stdout] 179 | | exchange.place_order(new_order); [INFO] [stdout] 180 | | } [INFO] [stdout] 181 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 177 ~ if window.is_key_pressed(Key::Key0, minifb::KeyRepeat::No) [INFO] [stdout] 178 ~ && let Some(new_order) = trader.flat() { [INFO] [stdout] 179 | exchange.place_order(new_order); [INFO] [stdout] 180 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | / if window.is_key_pressed(Key::R, minifb::KeyRepeat::No) { [INFO] [stdout] 184 | | if let Some(new_order) = trader.reverse() { [INFO] [stdout] 185 | | exchange.place_order(new_order); [INFO] [stdout] 186 | | } [INFO] [stdout] 187 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 183 ~ if window.is_key_pressed(Key::R, minifb::KeyRepeat::No) [INFO] [stdout] 184 ~ && let Some(new_order) = trader.reverse() { [INFO] [stdout] 185 | exchange.place_order(new_order); [INFO] [stdout] 186 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:223:9 [INFO] [stdout] | [INFO] [stdout] 223 | / if left_pressed && !left_was_pressed { [INFO] [stdout] 224 | | if let Some((_x, y)) = window.get_mouse_pos(MouseMode::Clamp) { [INFO] [stdout] 225 | | let price = renderer.px_to_price(y as i32); [INFO] [stdout] 226 | | if ctrl_pressed { [INFO] [stdout] ... | [INFO] [stdout] 251 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 223 ~ if left_pressed && !left_was_pressed [INFO] [stdout] 224 ~ && let Some((_x, y)) = window.get_mouse_pos(MouseMode::Clamp) { [INFO] [stdout] 225 | let price = renderer.px_to_price(y as i32); [INFO] [stdout] ... [INFO] [stdout] 249 | } [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:262:9 [INFO] [stdout] | [INFO] [stdout] 262 | / if trader.bid.is_some() { [INFO] [stdout] 263 | | if let Some(sl_pnl) = config.sl_pnl [INFO] [stdout] 264 | | && !sl_triggered [INFO] [stdout] ... | [INFO] [stdout] 287 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 262 ~ if trader.bid.is_some() [INFO] [stdout] 263 ~ && let Some(sl_pnl) = config.sl_pnl [INFO] [stdout] 264 | && !sl_triggered [INFO] [stdout] ... [INFO] [stdout] 285 | } [INFO] [stdout] 286 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:263:13 [INFO] [stdout] | [INFO] [stdout] 263 | / if let Some(sl_pnl) = config.sl_pnl [INFO] [stdout] 264 | | && !sl_triggered [INFO] [stdout] 265 | | { [INFO] [stdout] 266 | | if trader.get_pnl() < -sl_pnl.abs() { [INFO] [stdout] ... | [INFO] [stdout] 286 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 264 ~ && !sl_triggered [INFO] [stdout] 265 ~ && trader.get_pnl() < -sl_pnl.abs() { [INFO] [stdout] 266 | sl_triggered = true; [INFO] [stdout] ... [INFO] [stdout] 283 | .unwrap() [INFO] [stdout] 284 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/models/orders.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / pub fn new( [INFO] [stdout] 49 | | id: String, [INFO] [stdout] 50 | | order_type: OrderType, [INFO] [stdout] 51 | | order_side: OrderSide, [INFO] [stdout] ... | [INFO] [stdout] 59 | | is_update: bool, [INFO] [stdout] 60 | | ) -> Self { [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: this boolean expression can be simplified [INFO] [stdout] --> src/models/orders.rs:145:12 [INFO] [stdout] | [INFO] [stdout] 145 | if !bid.is_some() || !ask.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `bid.is_none()` [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/models/orders.rs:145:30 [INFO] [stdout] | [INFO] [stdout] 145 | if !bid.is_some() || !ask.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `ask.is_none()` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/models/symbol.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 24 | / let min_qty = (self.min_notional / price) [INFO] [stdout] 25 | | .round_dp_with_strategy( [INFO] [stdout] 26 | | self.step_size.normalize().scale(), [INFO] [stdout] 27 | | rust_decimal::RoundingStrategy::ToZero, [INFO] [stdout] 28 | | ) [INFO] [stdout] 29 | | .max(self.step_size); [INFO] [stdout] | |_____________________________________- unnecessary `let` binding [INFO] [stdout] 30 | min_qty [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 24 ~ [INFO] [stdout] 25 ~ (self.min_notional / price) [INFO] [stdout] 26 + .round_dp_with_strategy( [INFO] [stdout] 27 + self.step_size.normalize().scale(), [INFO] [stdout] 28 + rust_decimal::RoundingStrategy::ToZero, [INFO] [stdout] 29 + ) [INFO] [stdout] 30 + .max(self.step_size) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/models/timestamp.rs:33:26 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn to_utc_string(&self) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | / if let Some(pos) = PX_PER_TICK_CHOICES [INFO] [stdout] 83 | | .iter() [INFO] [stdout] 84 | | .position(|&x| Decimal::from_str(x).unwrap() == self.px_per_tick) [INFO] [stdout] ... | [INFO] [stdout] 90 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 84 ~ .position(|&x| Decimal::from_str(x).unwrap() == self.px_per_tick) [INFO] [stdout] 85 ~ && pos > 0 { [INFO] [stdout] 86 | self.px_per_tick = Decimal::from_str(PX_PER_TICK_CHOICES[pos - 1]).unwrap(); [INFO] [stdout] 87 | self.book_entry_range = Decimal::ZERO; [INFO] [stdout] 88 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | / if let Some(pos) = PX_PER_TICK_CHOICES [INFO] [stdout] 95 | | .iter() [INFO] [stdout] 96 | | .position(|&x| Decimal::from_str(x).unwrap() == self.px_per_tick) [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 96 ~ .position(|&x| Decimal::from_str(x).unwrap() == self.px_per_tick) [INFO] [stdout] 97 ~ && pos + 1 < PX_PER_TICK_CHOICES.len() { [INFO] [stdout] 98 | self.px_per_tick = Decimal::from_str(PX_PER_TICK_CHOICES[pos + 1]).unwrap(); [INFO] [stdout] 99 | self.book_entry_range = Decimal::ZERO; [INFO] [stdout] 100 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/renderer.rs:118:5 [INFO] [stdout] | [INFO] [stdout] 118 | / pub fn render( [INFO] [stdout] 119 | | &mut self, [INFO] [stdout] 120 | | shared_state: &SharedState, [INFO] [stdout] 121 | | trader: &Trader, [INFO] [stdout] ... | [INFO] [stdout] 126 | | force_redraw: bool, [INFO] [stdout] 127 | | ) { [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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/renderer.rs:435:30 [INFO] [stdout] | [INFO] [stdout] 435 | trader.size_quote.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/renderer.rs:436:41 [INFO] [stdout] | [INFO] [stdout] 436 | trader.get_size_multiplier().to_string(), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:1059:9 [INFO] [stdout] | [INFO] [stdout] 1059 | / if max_oi > Decimal::ZERO { [INFO] [stdout] 1060 | | if !oi_diff.is_zero() { [INFO] [stdout] 1061 | | let oi_height = ((max_oi / Decimal::from(100) / oi_diff) [INFO] [stdout] 1062 | | * Decimal::from(volume_height)) [INFO] [stdout] ... | [INFO] [stdout] 1081 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1059 ~ if max_oi > Decimal::ZERO [INFO] [stdout] 1060 ~ && !oi_diff.is_zero() { [INFO] [stdout] 1061 | let oi_height = ((max_oi / Decimal::from(100) / oi_diff) [INFO] [stdout] ... [INFO] [stdout] 1079 | ); [INFO] [stdout] 1080 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/renderer.rs:1095:13 [INFO] [stdout] | [INFO] [stdout] 1095 | &interval.slug().to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `interval.slug()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/renderer.rs:1127:9 [INFO] [stdout] | [INFO] [stdout] 1127 | self.dt.get_data().iter().map(|&pixel| pixel).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.dt.get_data().iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/trader.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if let Some(size) = self.get_single_size() { [INFO] [stdout] 54 | | Some(size * Decimal::from(self.get_size_multiplier())) [INFO] [stdout] 55 | | } else { [INFO] [stdout] 56 | | None [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________^ help: try: `self.get_single_size().map(|size| size * Decimal::from(self.get_size_multiplier()))` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/trader.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | / if let Some(size) = self.get_work_size() { [INFO] [stdout] 62 | | Some(NewOrder { [INFO] [stdout] 63 | | order_type: OrderType::Market, [INFO] [stdout] 64 | | order_side: OrderSide::Buy, [INFO] [stdout] ... | [INFO] [stdout] 69 | | None [INFO] [stdout] 70 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 61 ~ self.get_work_size().map(|size| NewOrder { [INFO] [stdout] 62 + order_type: OrderType::Market, [INFO] [stdout] 63 + order_side: OrderSide::Buy, [INFO] [stdout] 64 + quantity: size, [INFO] [stdout] 65 + price: None, [INFO] [stdout] 66 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/trader.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | / if let Some(size) = self.get_work_size() { [INFO] [stdout] 75 | | Some(NewOrder { [INFO] [stdout] 76 | | order_type: OrderType::Market, [INFO] [stdout] 77 | | order_side: OrderSide::Sell, [INFO] [stdout] ... | [INFO] [stdout] 82 | | None [INFO] [stdout] 83 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 74 ~ self.get_work_size().map(|size| NewOrder { [INFO] [stdout] 75 + order_type: OrderType::Market, [INFO] [stdout] 76 + order_side: OrderSide::Sell, [INFO] [stdout] 77 + quantity: size, [INFO] [stdout] 78 + price: None, [INFO] [stdout] 79 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/trader.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | / if let Some(size) = self.get_work_size() { [INFO] [stdout] 89 | | Some(NewOrder { [INFO] [stdout] 90 | | order_type: OrderType::Limit, [INFO] [stdout] 91 | | order_side: if price < bid { [INFO] [stdout] ... | [INFO] [stdout] 100 | | None [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 88 ~ self.get_work_size().map(|size| NewOrder { [INFO] [stdout] 89 + order_type: OrderType::Limit, [INFO] [stdout] 90 + order_side: if price < bid { [INFO] [stdout] 91 + OrderSide::Buy [INFO] [stdout] 92 + } else { [INFO] [stdout] 93 + OrderSide::Sell [INFO] [stdout] 94 + }, [INFO] [stdout] 95 + quantity: size, [INFO] [stdout] 96 + price: Some(price), [INFO] [stdout] 97 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/trader.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | / if let Some(size) = self.get_work_size() { [INFO] [stdout] 110 | | Some(NewOrder { [INFO] [stdout] 111 | | order_type: OrderType::Stop, [INFO] [stdout] 112 | | order_side: if price < bid { [INFO] [stdout] ... | [INFO] [stdout] 121 | | None [INFO] [stdout] 122 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 109 ~ self.get_work_size().map(|size| NewOrder { [INFO] [stdout] 110 + order_type: OrderType::Stop, [INFO] [stdout] 111 + order_side: if price < bid { [INFO] [stdout] 112 + OrderSide::Sell [INFO] [stdout] 113 + } else { [INFO] [stdout] 114 + OrderSide::Buy [INFO] [stdout] 115 + }, [INFO] [stdout] 116 + quantity: size, [INFO] [stdout] 117 + price: Some(price), [INFO] [stdout] 118 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `trader.bid` after checking its variant with `is_some` [INFO] [stdout] --> src/main.rs:126:38 [INFO] [stdout] | [INFO] [stdout] 125 | if trader.bid.is_some() && trader.ask.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 126 | for alert in alerts.scan(trader.bid.unwrap(), trader.ask.unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `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 `trader.ask` after checking its variant with `is_some` [INFO] [stdout] --> src/main.rs:126:59 [INFO] [stdout] | [INFO] [stdout] 125 | if trader.bid.is_some() && trader.ask.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 126 | for alert in alerts.scan(trader.bid.unwrap(), trader.ask.unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `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: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | / if window.is_key_pressed(Key::Equal, minifb::KeyRepeat::No) { [INFO] [stdout] 166 | | if let Some(new_order) = trader.market_buy() { [INFO] [stdout] 167 | | exchange.place_order(new_order); [INFO] [stdout] 168 | | } [INFO] [stdout] 169 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 165 ~ if window.is_key_pressed(Key::Equal, minifb::KeyRepeat::No) [INFO] [stdout] 166 ~ && let Some(new_order) = trader.market_buy() { [INFO] [stdout] 167 | exchange.place_order(new_order); [INFO] [stdout] 168 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / if window.is_key_pressed(Key::Minus, minifb::KeyRepeat::No) { [INFO] [stdout] 172 | | if let Some(new_order) = trader.market_sell() { [INFO] [stdout] 173 | | exchange.place_order(new_order); [INFO] [stdout] 174 | | } [INFO] [stdout] 175 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 171 ~ if window.is_key_pressed(Key::Minus, minifb::KeyRepeat::No) [INFO] [stdout] 172 ~ && let Some(new_order) = trader.market_sell() { [INFO] [stdout] 173 | exchange.place_order(new_order); [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | / if window.is_key_pressed(Key::Key0, minifb::KeyRepeat::No) { [INFO] [stdout] 178 | | if let Some(new_order) = trader.flat() { [INFO] [stdout] 179 | | exchange.place_order(new_order); [INFO] [stdout] 180 | | } [INFO] [stdout] 181 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 177 ~ if window.is_key_pressed(Key::Key0, minifb::KeyRepeat::No) [INFO] [stdout] 178 ~ && let Some(new_order) = trader.flat() { [INFO] [stdout] 179 | exchange.place_order(new_order); [INFO] [stdout] 180 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | / if window.is_key_pressed(Key::R, minifb::KeyRepeat::No) { [INFO] [stdout] 184 | | if let Some(new_order) = trader.reverse() { [INFO] [stdout] 185 | | exchange.place_order(new_order); [INFO] [stdout] 186 | | } [INFO] [stdout] 187 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 183 ~ if window.is_key_pressed(Key::R, minifb::KeyRepeat::No) [INFO] [stdout] 184 ~ && let Some(new_order) = trader.reverse() { [INFO] [stdout] 185 | exchange.place_order(new_order); [INFO] [stdout] 186 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:223:9 [INFO] [stdout] | [INFO] [stdout] 223 | / if left_pressed && !left_was_pressed { [INFO] [stdout] 224 | | if let Some((_x, y)) = window.get_mouse_pos(MouseMode::Clamp) { [INFO] [stdout] 225 | | let price = renderer.px_to_price(y as i32); [INFO] [stdout] 226 | | if ctrl_pressed { [INFO] [stdout] ... | [INFO] [stdout] 251 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 223 ~ if left_pressed && !left_was_pressed [INFO] [stdout] 224 ~ && let Some((_x, y)) = window.get_mouse_pos(MouseMode::Clamp) { [INFO] [stdout] 225 | let price = renderer.px_to_price(y as i32); [INFO] [stdout] ... [INFO] [stdout] 249 | } [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:262:9 [INFO] [stdout] | [INFO] [stdout] 262 | / if trader.bid.is_some() { [INFO] [stdout] 263 | | if let Some(sl_pnl) = config.sl_pnl [INFO] [stdout] 264 | | && !sl_triggered [INFO] [stdout] ... | [INFO] [stdout] 287 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 262 ~ if trader.bid.is_some() [INFO] [stdout] 263 ~ && let Some(sl_pnl) = config.sl_pnl [INFO] [stdout] 264 | && !sl_triggered [INFO] [stdout] ... [INFO] [stdout] 285 | } [INFO] [stdout] 286 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:263:13 [INFO] [stdout] | [INFO] [stdout] 263 | / if let Some(sl_pnl) = config.sl_pnl [INFO] [stdout] 264 | | && !sl_triggered [INFO] [stdout] 265 | | { [INFO] [stdout] 266 | | if trader.get_pnl() < -sl_pnl.abs() { [INFO] [stdout] ... | [INFO] [stdout] 286 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 264 ~ && !sl_triggered [INFO] [stdout] 265 ~ && trader.get_pnl() < -sl_pnl.abs() { [INFO] [stdout] 266 | sl_triggered = true; [INFO] [stdout] ... [INFO] [stdout] 283 | .unwrap() [INFO] [stdout] 284 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 27s [INFO] running `Command { std: "docker" "inspect" "3d54b44285437e7f0d5823954bf81a9962f0e8c5bb9067603f06d8d89b9fc9d0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3d54b44285437e7f0d5823954bf81a9962f0e8c5bb9067603f06d8d89b9fc9d0", kill_on_drop: false }` [INFO] [stdout] 3d54b44285437e7f0d5823954bf81a9962f0e8c5bb9067603f06d8d89b9fc9d0