[INFO] cloning repository https://github.com/splumber/rust-autohedge [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/splumber/rust-autohedge" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsplumber%2Frust-autohedge", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsplumber%2Frust-autohedge'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 11e61ae2e7ef6c2e275293aa82456f68d9399e5d [INFO] linting splumber/rust-autohedge against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsplumber%2Frust-autohedge" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/splumber/rust-autohedge [INFO] finished tweaking git repo https://github.com/splumber/rust-autohedge [INFO] tweaked toml for git repo https://github.com/splumber/rust-autohedge written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/splumber/rust-autohedge 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/splumber/rust-autohedge 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 async-convert v1.0.0 [INFO] [stderr] Downloaded async-openai v0.26.0 [INFO] [stderr] Downloaded tokio-cron-scheduler v0.10.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] d62b3a7a1118c11aa614823700f6ed69f58f35603db96de342a7c9039834a9d6 [INFO] running `Command { std: "docker" "start" "-a" "d62b3a7a1118c11aa614823700f6ed69f58f35603db96de342a7c9039834a9d6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d62b3a7a1118c11aa614823700f6ed69f58f35603db96de342a7c9039834a9d6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d62b3a7a1118c11aa614823700f6ed69f58f35603db96de342a7c9039834a9d6", kill_on_drop: false }` [INFO] [stdout] d62b3a7a1118c11aa614823700f6ed69f58f35603db96de342a7c9039834a9d6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 401c30396b799e1a94aa55231907eb27da8a8d333bed03ca291a508943857e50 [INFO] running `Command { std: "docker" "start" "-a" "401c30396b799e1a94aa55231907eb27da8a8d333bed03ca291a508943857e50", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.178 [INFO] [stderr] Compiling find-msvc-tools v0.1.5 [INFO] [stderr] Checking tracing-core v0.1.35 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Checking indexmap v2.12.1 [INFO] [stderr] Checking rustls-pki-types v1.13.1 [INFO] [stderr] Compiling zerocopy v0.8.31 [INFO] [stderr] Compiling rustls v0.23.35 [INFO] [stderr] Compiling zmij v1.0.6 [INFO] [stderr] Compiling unicase v2.8.1 [INFO] [stderr] Compiling serde_json v1.0.148 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking iri-string v0.7.9 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling cc v1.2.49 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Checking rustls-native-certs v0.8.2 [INFO] [stderr] Checking webpki-roots v1.0.4 [INFO] [stderr] Checking iana-time-zone v0.1.64 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking futures-timer v3.0.3 [INFO] [stderr] Compiling tokio-cron-scheduler v0.10.2 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking serde_path_to_error v0.1.20 [INFO] [stderr] Checking matchit v0.8.4 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Compiling openssl-sys v0.9.111 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking signal-hook-registry v1.4.7 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking eventsource-stream v0.2.3 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Compiling openssl v0.10.75 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Compiling num-derive v0.3.3 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking matchers v0.2.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Checking rustls-webpki v0.103.8 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking async-convert v1.0.0 [INFO] [stderr] Checking tracing v0.1.43 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking axum-core v0.5.6 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Compiling derive_builder_core v0.20.2 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Compiling derive_builder_macro v0.20.2 [INFO] [stderr] Checking derive_builder v0.20.2 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking secrecy v0.8.0 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking tungstenite v0.24.0 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking tokio-util v0.7.17 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking backoff v0.4.0 [INFO] [stderr] Checking tokio-stream v0.1.17 [INFO] [stderr] Checking tokio-tungstenite v0.24.0 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking h2 v0.4.12 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Checking cron v0.12.1 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Checking hyper-util v0.1.19 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking axum v0.8.8 [INFO] [stderr] Checking reqwest v0.12.28 [INFO] [stderr] Checking reqwest-eventsource v0.6.0 [INFO] [stderr] Checking async-openai v0.26.0 [INFO] [stderr] Checking rust_autohedge v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/constants.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/exchange/symbols.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / /// - Kraken: "XBT/USD" (Kraken prefers XBT for BTC) [INFO] [stdout] 9 | | [INFO] [stdout] | |_^ [INFO] [stdout] 10 | pub fn to_coinbase_product_id(canonical: &str) -> String { [INFO] [stdout] | ----------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Simple symbol normalization helpers. [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! Canonical symbol (used internally): [INFO] [stdout] 4 ~ //! - crypto: "BASE/USD" like "BTC/USD" (matches existing .env values) [INFO] [stdout] 5 ~ //! [INFO] [stdout] 6 ~ //! Exchange mappings: [INFO] [stdout] 7 ~ //! - Coinbase: "BTC-USD" [INFO] [stdout] 8 ~ //! - Kraken: "XBT/USD" (Kraken prefers XBT for BTC) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/constants.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/exchange/symbols.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / /// - Kraken: "XBT/USD" (Kraken prefers XBT for BTC) [INFO] [stdout] 9 | | [INFO] [stdout] | |_^ [INFO] [stdout] 10 | pub fn to_coinbase_product_id(canonical: &str) -> String { [INFO] [stdout] | ----------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Simple symbol normalization helpers. [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! Canonical symbol (used internally): [INFO] [stdout] 4 ~ //! - crypto: "BASE/USD" like "BTC/USD" (matches existing .env values) [INFO] [stdout] 5 ~ //! [INFO] [stdout] 6 ~ //! Exchange mappings: [INFO] [stdout] 7 ~ //! - Coinbase: "BTC-USD" [INFO] [stdout] 8 ~ //! - Kraken: "XBT/USD" (Kraken prefers XBT for BTC) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `qty` is never read [INFO] [stdout] --> src/services/execution_fast.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 34 | struct ExecutionOutput { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 35 | action: String, [INFO] [stdout] 36 | qty: f64, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/bus.rs:19:44 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn publish(&self, event: Event) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 136 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `tokio::sync::broadcast::error::SendError`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/data/alpaca.rs:233:32 [INFO] [stdout] | [INFO] [stdout] 233 | let url = if is_crypto { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 234 | | format!("{}/v2/orders", self.base_url) [INFO] [stdout] 235 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/data/alpaca.rs:235:16 [INFO] [stdout] | [INFO] [stdout] 235 | } else { [INFO] [stdout] | ________________^ [INFO] [stdout] 236 | | format!("{}/v2/orders", self.base_url) [INFO] [stdout] 237 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 101 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/exchange/symbols.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 16 | let s = canonical.replace("BTC/", "XBT/"); [INFO] [stdout] | ------------------------------------------ unnecessary `let` binding [INFO] [stdout] 17 | s [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] 16 ~ [INFO] [stdout] 17 ~ canonical.replace("BTC/", "XBT/") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing last element with `arr.get(arr.len() - 1)` [INFO] [stdout] --> src/exchange/ws.rs:410:28 [INFO] [stdout] | [INFO] [stdout] 410 | let pair = arr [INFO] [stdout] | ____________________________^ [INFO] [stdout] 411 | | .get(arr.len() - 1) [INFO] [stdout] | |_______________________________________^ help: try: `arr.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] = note: `#[warn(clippy::get_last_with_len)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tarr.get(0)` [INFO] [stdout] --> src/exchange/ws.rs:420:45 [INFO] [stdout] | [INFO] [stdout] 420 | ... let price = tarr [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 421 | | ... .get(0) [INFO] [stdout] | |_________________________________^ help: try: `tarr.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/execution_fast.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / async fn execute_fast( [INFO] [stdout] 128 | | req: OrderRequest, [INFO] [stdout] 129 | | exchange: Arc, [INFO] [stdout] 130 | | store: MarketStore, [INFO] [stdout] ... | [INFO] [stdout] 136 | | rate_limiter: RateLimiter, [INFO] [stdout] 137 | | ) { [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 `OrderType` which implements the `Copy` trait [INFO] [stdout] --> src/services/execution_fast.rs:308:25 [INFO] [stdout] | [INFO] [stdout] 308 | order_type: order_type.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `order_type` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/services/execution_utils.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | / match cache.last_fetch { [INFO] [stdout] 41 | | Some(t) if t.elapsed() < self.refresh_interval => false, [INFO] [stdout] 42 | | _ => true, [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 40 - match cache.last_fetch { [INFO] [stdout] 41 - Some(t) if t.elapsed() < self.refresh_interval => false, [INFO] [stdout] 42 - _ => true, [INFO] [stdout] 43 - } [INFO] [stdout] 40 + !matches!(cache.last_fetch, Some(t) if t.elapsed() < self.refresh_interval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PositionTracker` [INFO] [stdout] --> src/services/position_monitor.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / pub fn new() -> Self { [INFO] [stdout] 55 | | Self { [INFO] [stdout] 56 | | positions: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] 57 | | pending_orders: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] 58 | | } [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 53 + impl Default for PositionTracker { [INFO] [stdout] 54 + fn default() -> Self { [INFO] [stdout] 55 + Self::new() [INFO] [stdout] 56 + } [INFO] [stdout] 57 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/services/position_monitor.rs:281:37 [INFO] [stdout] | [INFO] [stdout] 281 | ... &order, &*exchange, &tracker, &config, [INFO] [stdout] | ^^^^^^ help: change this to: `order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/services/position_monitor.rs:290:64 [INFO] [stdout] | [INFO] [stdout] 290 | ... Self::check_pending_sell_order(&order, &*exchange, &tracker).await; [INFO] [stdout] | ^^^^^^ help: change this to: `order` [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: field `qty` is never read [INFO] [stdout] --> src/services/execution_fast.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 34 | struct ExecutionOutput { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 35 | action: String, [INFO] [stdout] 36 | qty: f64, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/bus.rs:19:44 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn publish(&self, event: Event) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 136 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `tokio::sync::broadcast::error::SendError`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/data/alpaca.rs:233:32 [INFO] [stdout] | [INFO] [stdout] 233 | let url = if is_crypto { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 234 | | format!("{}/v2/orders", self.base_url) [INFO] [stdout] 235 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/data/alpaca.rs:235:16 [INFO] [stdout] | [INFO] [stdout] 235 | } else { [INFO] [stdout] | ________________^ [INFO] [stdout] 236 | | format!("{}/v2/orders", self.base_url) [INFO] [stdout] 237 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 101 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/data/store_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod store_tests { [INFO] [stdout] 5 | | use crate::data::store::{Bar, MarketStore, Quote, Trade}; [INFO] [stdout] 6 | | [INFO] [stdout] 7 | | #[test] [INFO] [stdout] ... | [INFO] [stdout] 295 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/exchange/symbols.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 16 | let s = canonical.replace("BTC/", "XBT/"); [INFO] [stdout] | ------------------------------------------ unnecessary `let` binding [INFO] [stdout] 17 | s [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] 16 ~ [INFO] [stdout] 17 ~ canonical.replace("BTC/", "XBT/") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/services/risk.rs:72:38 [INFO] [stdout] | [INFO] [stdout] 72 | if let Ok(val) = part["tp=".len()..].parse::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/services/risk.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | if part.starts_with("tp=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 71 ~ if let Some() = part.strip_prefix("tp=") { [INFO] [stdout] 72 ~ if let Ok(val) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/services/risk.rs:76:38 [INFO] [stdout] | [INFO] [stdout] 76 | if let Ok(val) = part["sl=".len()..].parse::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/services/risk.rs:75:24 [INFO] [stdout] | [INFO] [stdout] 75 | } else if part.starts_with("sl=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 75 ~ } else if let Some() = part.strip_prefix("sl=") { [INFO] [stdout] 76 ~ if let Ok(val) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing last element with `arr.get(arr.len() - 1)` [INFO] [stdout] --> src/exchange/ws.rs:410:28 [INFO] [stdout] | [INFO] [stdout] 410 | let pair = arr [INFO] [stdout] | ____________________________^ [INFO] [stdout] 411 | | .get(arr.len() - 1) [INFO] [stdout] | |_______________________________________^ help: try: `arr.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] = note: `#[warn(clippy::get_last_with_len)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tarr.get(0)` [INFO] [stdout] --> src/exchange/ws.rs:420:45 [INFO] [stdout] | [INFO] [stdout] 420 | ... let price = tarr [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 421 | | ... .get(0) [INFO] [stdout] | |_________________________________^ help: try: `tarr.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/exchange/types_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod types_tests { [INFO] [stdout] 5 | | use crate::exchange::types::*; [INFO] [stdout] 6 | | use serde_json::json; [INFO] [stdout] ... | [INFO] [stdout] 223 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/strategy.rs:395:5 [INFO] [stdout] | [INFO] [stdout] 395 | / async fn evaluate_hybrid( [INFO] [stdout] 396 | | symbol: String, [INFO] [stdout] 397 | | bid: f64, [INFO] [stdout] 398 | | ask: f64, [INFO] [stdout] ... | [INFO] [stdout] 404 | | config: AppConfig, [INFO] [stdout] 405 | | ) { [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 boolean expression can be simplified [INFO] [stdout] --> src/services/strategy.rs:473:39 [INFO] [stdout] | [INFO] [stdout] 473 | let allowed = !(lower.contains("no_trade") [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 474 | | || lower.contains("no trade") [INFO] [stdout] 475 | | || (!lower.contains("trade") && !lower.contains("opportunity"))); [INFO] [stdout] | |____________________________________________________________________________________________^ help: try: `(lower.contains("opportunity") || lower.contains("trade")) && !lower.contains("no trade") && !lower.contains("no_trade")` [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 function has too many arguments (9/7) [INFO] [stdout] --> src/services/execution_fast.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / async fn execute_fast( [INFO] [stdout] 128 | | req: OrderRequest, [INFO] [stdout] 129 | | exchange: Arc, [INFO] [stdout] 130 | | store: MarketStore, [INFO] [stdout] ... | [INFO] [stdout] 136 | | rate_limiter: RateLimiter, [INFO] [stdout] 137 | | ) { [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: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/agents/mod.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | async fn run( [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] = note: `#[warn(async_fn_in_trait)]` on by default [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 16 ~ fn run( [INFO] [stdout] 17 | &self, [INFO] [stdout] 18 | query: &str, [INFO] [stdout] 19 | llm: &LLMQueue, [INFO] [stdout] 20 ~ ) -> impl std::future::Future>> + Send {async { [INFO] [stdout] 21 | self.run_with_priority(query, llm, Priority::Normal).await [INFO] [stdout] 22 ~ } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/agents/mod.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | async fn run_high_priority( [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 25 ~ fn run_high_priority( [INFO] [stdout] 26 | &self, [INFO] [stdout] 27 | query: &str, [INFO] [stdout] 28 | llm: &LLMQueue, [INFO] [stdout] 29 ~ ) -> impl std::future::Future>> + Send {async { [INFO] [stdout] 30 | self.run_with_priority(query, llm, Priority::High).await [INFO] [stdout] 31 ~ } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/agents/mod.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | async fn run_with_priority( [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 34 ~ fn run_with_priority( [INFO] [stdout] 35 | &self, [INFO] [stdout] ... [INFO] [stdout] 38 | priority: Priority, [INFO] [stdout] 39 ~ ) -> impl std::future::Future>> + Send {async { [INFO] [stdout] 40 | let priority_str = match priority { [INFO] [stdout] ... [INFO] [stdout] 51 | Ok(response) [INFO] [stdout] 52 ~ } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `OrderType` which implements the `Copy` trait [INFO] [stdout] --> src/services/execution_fast.rs:308:25 [INFO] [stdout] | [INFO] [stdout] 308 | order_type: order_type.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `order_type` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/services/execution_utils.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | / match cache.last_fetch { [INFO] [stdout] 41 | | Some(t) if t.elapsed() < self.refresh_interval => false, [INFO] [stdout] 42 | | _ => true, [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 40 - match cache.last_fetch { [INFO] [stdout] 41 - Some(t) if t.elapsed() < self.refresh_interval => false, [INFO] [stdout] 42 - _ => true, [INFO] [stdout] 43 - } [INFO] [stdout] 40 + !matches!(cache.last_fetch, Some(t) if t.elapsed() < self.refresh_interval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PositionTracker` [INFO] [stdout] --> src/services/position_monitor.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / pub fn new() -> Self { [INFO] [stdout] 55 | | Self { [INFO] [stdout] 56 | | positions: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] 57 | | pending_orders: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] 58 | | } [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 53 + impl Default for PositionTracker { [INFO] [stdout] 54 + fn default() -> Self { [INFO] [stdout] 55 + Self::new() [INFO] [stdout] 56 + } [INFO] [stdout] 57 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/services/position_monitor.rs:281:37 [INFO] [stdout] | [INFO] [stdout] 281 | ... &order, &*exchange, &tracker, &config, [INFO] [stdout] | ^^^^^^ help: change this to: `order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/services/position_monitor.rs:290:64 [INFO] [stdout] | [INFO] [stdout] 290 | ... Self::check_pending_sell_order(&order, &*exchange, &tracker).await; [INFO] [stdout] | ^^^^^^ help: change this to: `order` [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: stripping a prefix manually [INFO] [stdout] --> src/services/risk.rs:72:38 [INFO] [stdout] | [INFO] [stdout] 72 | if let Ok(val) = part["tp=".len()..].parse::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/services/risk.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | if part.starts_with("tp=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 71 ~ if let Some() = part.strip_prefix("tp=") { [INFO] [stdout] 72 ~ if let Ok(val) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/services/risk.rs:76:38 [INFO] [stdout] | [INFO] [stdout] 76 | if let Ok(val) = part["sl=".len()..].parse::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/services/risk.rs:75:24 [INFO] [stdout] | [INFO] [stdout] 75 | } else if part.starts_with("sl=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 75 ~ } else if let Some() = part.strip_prefix("sl=") { [INFO] [stdout] 76 ~ if let Ok(val) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bus` [INFO] [stdout] --> tests/integration_tests.rs:218:9 [INFO] [stdout] | [INFO] [stdout] 218 | let bus = EventBus::new(100); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_bus` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/strategy.rs:395:5 [INFO] [stdout] | [INFO] [stdout] 395 | / async fn evaluate_hybrid( [INFO] [stdout] 396 | | symbol: String, [INFO] [stdout] 397 | | bid: f64, [INFO] [stdout] 398 | | ask: f64, [INFO] [stdout] ... | [INFO] [stdout] 404 | | config: AppConfig, [INFO] [stdout] 405 | | ) { [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 boolean expression can be simplified [INFO] [stdout] --> src/services/strategy.rs:473:39 [INFO] [stdout] | [INFO] [stdout] 473 | let allowed = !(lower.contains("no_trade") [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 474 | | || lower.contains("no trade") [INFO] [stdout] 475 | | || (!lower.contains("trade") && !lower.contains("opportunity"))); [INFO] [stdout] | |____________________________________________________________________________________________^ help: try: `(lower.contains("opportunity") || lower.contains("trade")) && !lower.contains("no trade") && !lower.contains("no_trade")` [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: useless use of `vec!` [INFO] [stdout] --> tests/integration_tests.rs:222:19 [INFO] [stdout] | [INFO] [stdout] 222 | let symbols = vec!["BTC/USD", "ETH/USD", "SOL/USD", "DOGE/USD"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["BTC/USD", "ETH/USD", "SOL/USD", "DOGE/USD"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/services/execution_utils_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod execution_utils_tests { [INFO] [stdout] 5 | | use crate::services::execution_utils::*; [INFO] [stdout] ... | [INFO] [stdout] 358 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/services/reporting_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod reporting_tests { [INFO] [stdout] 5 | | use crate::services::reporting::*; [INFO] [stdout] ... | [INFO] [stdout] 359 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/services/reporting_tests.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | summary.total_orders = 100; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `services::reporting::PerformanceSummary { total_orders: 100, buys: 60, sells: 40, filled: 95, rejected: 5, total_notional: 50000.0, winning_trades: 30, losing_trades: 10, total_profit: 500.0, total_loss: 200.0, total_realized_pnl: 300.0, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/services/reporting_tests.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let mut summary = PerformanceSummary::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/services/reporting_tests.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | summary.winning_trades = 7; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `services::reporting::PerformanceSummary { winning_trades: 7, losing_trades: 3, total_profit: 700.0, total_loss: 300.0, total_realized_pnl: 400.0, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/services/reporting_tests.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut summary = PerformanceSummary::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/services/reporting_tests.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | summary.winning_trades = 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `services::reporting::PerformanceSummary { winning_trades: 10, losing_trades: 0, total_profit: 1000.0, total_loss: 0.0, total_realized_pnl: 1000.0, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/services/reporting_tests.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | let mut summary = PerformanceSummary::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/services/reporting_tests.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | summary.winning_trades = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `services::reporting::PerformanceSummary { winning_trades: 0, losing_trades: 10, total_profit: 0.0, total_loss: 500.0, total_realized_pnl: -500.0, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/services/reporting_tests.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | let mut summary = PerformanceSummary::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/services/reporting_tests.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | summary.total_orders = 50; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `services::reporting::PerformanceSummary { total_orders: 50, buys: 30, sells: 20, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/services/reporting_tests.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | let mut summary = PerformanceSummary::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/bus_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod bus_tests { [INFO] [stdout] 5 | | use crate::bus::EventBus; [INFO] [stdout] 6 | | use crate::events::{AnalysisSignal, Event, ExecutionReport, MarketEvent, OrderRequest}; [INFO] [stdout] ... | [INFO] [stdout] 175 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/config_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod config_tests { [INFO] [stdout] 5 | | use crate::config::*; [INFO] [stdout] ... | [INFO] [stdout] 418 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/events_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod events_tests { [INFO] [stdout] 5 | | use crate::events::*; [INFO] [stdout] ... | [INFO] [stdout] 369 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/agents/mod.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | async fn run( [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] = note: `#[warn(async_fn_in_trait)]` on by default [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 16 ~ fn run( [INFO] [stdout] 17 | &self, [INFO] [stdout] 18 | query: &str, [INFO] [stdout] 19 | llm: &LLMQueue, [INFO] [stdout] 20 ~ ) -> impl std::future::Future>> + Send {async { [INFO] [stdout] 21 | self.run_with_priority(query, llm, Priority::Normal).await [INFO] [stdout] 22 ~ } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/agents/mod.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | async fn run_high_priority( [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 25 ~ fn run_high_priority( [INFO] [stdout] 26 | &self, [INFO] [stdout] 27 | query: &str, [INFO] [stdout] 28 | llm: &LLMQueue, [INFO] [stdout] 29 ~ ) -> impl std::future::Future>> + Send {async { [INFO] [stdout] 30 | self.run_with_priority(query, llm, Priority::High).await [INFO] [stdout] 31 ~ } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified [INFO] [stdout] --> src/agents/mod.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | async fn run_with_priority( [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future` [INFO] [stdout] help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change [INFO] [stdout] | [INFO] [stdout] 34 ~ fn run_with_priority( [INFO] [stdout] 35 | &self, [INFO] [stdout] ... [INFO] [stdout] 38 | priority: Priority, [INFO] [stdout] 39 ~ ) -> impl std::future::Future>> + Send {async { [INFO] [stdout] 40 | let priority_str = match priority { [INFO] [stdout] ... [INFO] [stdout] 51 | Ok(response) [INFO] [stdout] 52 ~ } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/exchange/symbols.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / /// - Kraken: "XBT/USD" (Kraken prefers XBT for BTC) [INFO] [stdout] 9 | | [INFO] [stdout] | |_^ [INFO] [stdout] 10 | pub fn to_coinbase_product_id(canonical: &str) -> String { [INFO] [stdout] | ----------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Simple symbol normalization helpers. [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! Canonical symbol (used internally): [INFO] [stdout] 4 ~ //! - crypto: "BASE/USD" like "BTC/USD" (matches existing .env values) [INFO] [stdout] 5 ~ //! [INFO] [stdout] 6 ~ //! Exchange mappings: [INFO] [stdout] 7 ~ //! - Coinbase: "BTC-USD" [INFO] [stdout] 8 ~ //! - Kraken: "XBT/USD" (Kraken prefers XBT for BTC) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/exchange/symbols.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / /// - Kraken: "XBT/USD" (Kraken prefers XBT for BTC) [INFO] [stdout] 9 | | [INFO] [stdout] | |_^ [INFO] [stdout] 10 | pub fn to_coinbase_product_id(canonical: &str) -> String { [INFO] [stdout] | ----------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Simple symbol normalization helpers. [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! Canonical symbol (used internally): [INFO] [stdout] 4 ~ //! - crypto: "BASE/USD" like "BTC/USD" (matches existing .env values) [INFO] [stdout] 5 ~ //! [INFO] [stdout] 6 ~ //! Exchange mappings: [INFO] [stdout] 7 ~ //! - Coinbase: "BTC-USD" [INFO] [stdout] 8 ~ //! - Kraken: "XBT/USD" (Kraken prefers XBT for BTC) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ws_handle_lock` [INFO] [stdout] --> src/api.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | let ws_handle_lock = state.websocket_handle.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ws_handle_lock` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ws_handle_lock` [INFO] [stdout] --> src/api.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | let ws_handle_lock = state.websocket_handle.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ws_handle_lock` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `class` is never read [INFO] [stdout] --> src/api.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 56 | struct AssetParams { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 57 | class: 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: method `get_assets` is never used [INFO] [stdout] --> src/data/alpaca.rs:100:18 [INFO] [stdout] | [INFO] [stdout] 41 | impl AlpacaClient { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 100 | pub async fn get_assets( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NormalizedQuote` is never constructed [INFO] [stdout] --> src/exchange/types.rs:61:12 [INFO] [stdout] | [INFO] [stdout] 61 | pub struct NormalizedQuote { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NormalizedTrade` is never constructed [INFO] [stdout] --> src/exchange/types.rs:70:12 [INFO] [stdout] | [INFO] [stdout] 70 | pub struct NormalizedTrade { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_binance_stream_symbol` is never used [INFO] [stdout] --> src/exchange/symbols.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn to_binance_stream_symbol(canonical: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `qty` is never read [INFO] [stdout] --> src/services/execution_fast.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 34 | struct ExecutionOutput { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 35 | action: String, [INFO] [stdout] 36 | qty: f64, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/bus.rs:19:44 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn publish(&self, event: Event) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 136 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `tokio::sync::broadcast::error::SendError`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `class` is never read [INFO] [stdout] --> src/api.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 56 | struct AssetParams { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 57 | class: 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: method `get_assets` is never used [INFO] [stdout] --> src/data/alpaca.rs:100:18 [INFO] [stdout] | [INFO] [stdout] 41 | impl AlpacaClient { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 100 | pub async fn get_assets( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NormalizedQuote` is never constructed [INFO] [stdout] --> src/exchange/types.rs:61:12 [INFO] [stdout] | [INFO] [stdout] 61 | pub struct NormalizedQuote { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NormalizedTrade` is never constructed [INFO] [stdout] --> src/exchange/types.rs:70:12 [INFO] [stdout] | [INFO] [stdout] 70 | pub struct NormalizedTrade { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `qty` is never read [INFO] [stdout] --> src/services/execution_fast.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 34 | struct ExecutionOutput { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 35 | action: String, [INFO] [stdout] 36 | qty: f64, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/data/alpaca.rs:233:32 [INFO] [stdout] | [INFO] [stdout] 233 | let url = if is_crypto { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 234 | | format!("{}/v2/orders", self.base_url) [INFO] [stdout] 235 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/data/alpaca.rs:235:16 [INFO] [stdout] | [INFO] [stdout] 235 | } else { [INFO] [stdout] | ________________^ [INFO] [stdout] 236 | | format!("{}/v2/orders", self.base_url) [INFO] [stdout] 237 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/bus.rs:19:44 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn publish(&self, event: Event) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 136 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `tokio::sync::broadcast::error::SendError`, for example by boxing large elements or replacing it with `Box>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 101 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/exchange/symbols.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 16 | let s = canonical.replace("BTC/", "XBT/"); [INFO] [stdout] | ------------------------------------------ unnecessary `let` binding [INFO] [stdout] 17 | s [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] 16 ~ [INFO] [stdout] 17 ~ canonical.replace("BTC/", "XBT/") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/data/alpaca.rs:233:32 [INFO] [stdout] | [INFO] [stdout] 233 | let url = if is_crypto { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 234 | | format!("{}/v2/orders", self.base_url) [INFO] [stdout] 235 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/data/alpaca.rs:235:16 [INFO] [stdout] | [INFO] [stdout] 235 | } else { [INFO] [stdout] | ________________^ [INFO] [stdout] 236 | | format!("{}/v2/orders", self.base_url) [INFO] [stdout] 237 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing last element with `arr.get(arr.len() - 1)` [INFO] [stdout] --> src/exchange/ws.rs:410:28 [INFO] [stdout] | [INFO] [stdout] 410 | let pair = arr [INFO] [stdout] | ____________________________^ [INFO] [stdout] 411 | | .get(arr.len() - 1) [INFO] [stdout] | |_______________________________________^ help: try: `arr.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] = note: `#[warn(clippy::get_last_with_len)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tarr.get(0)` [INFO] [stdout] --> src/exchange/ws.rs:420:45 [INFO] [stdout] | [INFO] [stdout] 420 | ... let price = tarr [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 421 | | ... .get(0) [INFO] [stdout] | |_________________________________^ help: try: `tarr.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data/store.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 101 | .or_insert_with(VecDeque::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/data/store_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod store_tests { [INFO] [stdout] 5 | | use crate::data::store::{Bar, MarketStore, Quote, Trade}; [INFO] [stdout] 6 | | [INFO] [stdout] 7 | | #[test] [INFO] [stdout] ... | [INFO] [stdout] 295 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/exchange/symbols.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 16 | let s = canonical.replace("BTC/", "XBT/"); [INFO] [stdout] | ------------------------------------------ unnecessary `let` binding [INFO] [stdout] 17 | s [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] 16 ~ [INFO] [stdout] 17 ~ canonical.replace("BTC/", "XBT/") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing last element with `arr.get(arr.len() - 1)` [INFO] [stdout] --> src/exchange/ws.rs:410:28 [INFO] [stdout] | [INFO] [stdout] 410 | let pair = arr [INFO] [stdout] | ____________________________^ [INFO] [stdout] 411 | | .get(arr.len() - 1) [INFO] [stdout] | |_______________________________________^ help: try: `arr.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] = note: `#[warn(clippy::get_last_with_len)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tarr.get(0)` [INFO] [stdout] --> src/exchange/ws.rs:420:45 [INFO] [stdout] | [INFO] [stdout] 420 | ... let price = tarr [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 421 | | ... .get(0) [INFO] [stdout] | |_________________________________^ help: try: `tarr.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/exchange/types_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod types_tests { [INFO] [stdout] 5 | | use crate::exchange::types::*; [INFO] [stdout] 6 | | use serde_json::json; [INFO] [stdout] ... | [INFO] [stdout] 223 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/execution_fast.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / async fn execute_fast( [INFO] [stdout] 128 | | req: OrderRequest, [INFO] [stdout] 129 | | exchange: Arc, [INFO] [stdout] 130 | | store: MarketStore, [INFO] [stdout] ... | [INFO] [stdout] 136 | | rate_limiter: RateLimiter, [INFO] [stdout] 137 | | ) { [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 `OrderType` which implements the `Copy` trait [INFO] [stdout] --> src/services/execution_fast.rs:308:25 [INFO] [stdout] | [INFO] [stdout] 308 | order_type: order_type.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `order_type` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/services/execution_utils.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | / match cache.last_fetch { [INFO] [stdout] 41 | | Some(t) if t.elapsed() < self.refresh_interval => false, [INFO] [stdout] 42 | | _ => true, [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 40 - match cache.last_fetch { [INFO] [stdout] 41 - Some(t) if t.elapsed() < self.refresh_interval => false, [INFO] [stdout] 42 - _ => true, [INFO] [stdout] 43 - } [INFO] [stdout] 40 + !matches!(cache.last_fetch, Some(t) if t.elapsed() < self.refresh_interval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PositionTracker` [INFO] [stdout] --> src/services/position_monitor.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / pub fn new() -> Self { [INFO] [stdout] 55 | | Self { [INFO] [stdout] 56 | | positions: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] 57 | | pending_orders: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] 58 | | } [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 53 + impl Default for PositionTracker { [INFO] [stdout] 54 + fn default() -> Self { [INFO] [stdout] 55 + Self::new() [INFO] [stdout] 56 + } [INFO] [stdout] 57 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/execution_fast.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / async fn execute_fast( [INFO] [stdout] 128 | | req: OrderRequest, [INFO] [stdout] 129 | | exchange: Arc, [INFO] [stdout] 130 | | store: MarketStore, [INFO] [stdout] ... | [INFO] [stdout] 136 | | rate_limiter: RateLimiter, [INFO] [stdout] 137 | | ) { [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/services/position_monitor.rs:281:37 [INFO] [stdout] | [INFO] [stdout] 281 | ... &order, &*exchange, &tracker, &config, [INFO] [stdout] | ^^^^^^ help: change this to: `order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/services/position_monitor.rs:290:64 [INFO] [stdout] | [INFO] [stdout] 290 | ... Self::check_pending_sell_order(&order, &*exchange, &tracker).await; [INFO] [stdout] | ^^^^^^ help: change this to: `order` [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: using `clone` on type `OrderType` which implements the `Copy` trait [INFO] [stdout] --> src/services/execution_fast.rs:308:25 [INFO] [stdout] | [INFO] [stdout] 308 | order_type: order_type.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `order_type` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/services/execution_utils.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | / match cache.last_fetch { [INFO] [stdout] 41 | | Some(t) if t.elapsed() < self.refresh_interval => false, [INFO] [stdout] 42 | | _ => true, [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 40 - match cache.last_fetch { [INFO] [stdout] 41 - Some(t) if t.elapsed() < self.refresh_interval => false, [INFO] [stdout] 42 - _ => true, [INFO] [stdout] 43 - } [INFO] [stdout] 40 + !matches!(cache.last_fetch, Some(t) if t.elapsed() < self.refresh_interval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PositionTracker` [INFO] [stdout] --> src/services/position_monitor.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / pub fn new() -> Self { [INFO] [stdout] 55 | | Self { [INFO] [stdout] 56 | | positions: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] 57 | | pending_orders: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] 58 | | } [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 53 + impl Default for PositionTracker { [INFO] [stdout] 54 + fn default() -> Self { [INFO] [stdout] 55 + Self::new() [INFO] [stdout] 56 + } [INFO] [stdout] 57 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/services/position_monitor.rs:281:37 [INFO] [stdout] | [INFO] [stdout] 281 | ... &order, &*exchange, &tracker, &config, [INFO] [stdout] | ^^^^^^ help: change this to: `order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/services/position_monitor.rs:290:64 [INFO] [stdout] | [INFO] [stdout] 290 | ... Self::check_pending_sell_order(&order, &*exchange, &tracker).await; [INFO] [stdout] | ^^^^^^ help: change this to: `order` [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: stripping a prefix manually [INFO] [stdout] --> src/services/risk.rs:72:38 [INFO] [stdout] | [INFO] [stdout] 72 | if let Ok(val) = part["tp=".len()..].parse::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/services/risk.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | if part.starts_with("tp=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 71 ~ if let Some() = part.strip_prefix("tp=") { [INFO] [stdout] 72 ~ if let Ok(val) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/services/risk.rs:76:38 [INFO] [stdout] | [INFO] [stdout] 76 | if let Ok(val) = part["sl=".len()..].parse::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/services/risk.rs:75:24 [INFO] [stdout] | [INFO] [stdout] 75 | } else if part.starts_with("sl=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 75 ~ } else if let Some() = part.strip_prefix("sl=") { [INFO] [stdout] 76 ~ if let Ok(val) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/strategy.rs:395:5 [INFO] [stdout] | [INFO] [stdout] 395 | / async fn evaluate_hybrid( [INFO] [stdout] 396 | | symbol: String, [INFO] [stdout] 397 | | bid: f64, [INFO] [stdout] 398 | | ask: f64, [INFO] [stdout] ... | [INFO] [stdout] 404 | | config: AppConfig, [INFO] [stdout] 405 | | ) { [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 boolean expression can be simplified [INFO] [stdout] --> src/services/strategy.rs:473:39 [INFO] [stdout] | [INFO] [stdout] 473 | let allowed = !(lower.contains("no_trade") [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 474 | | || lower.contains("no trade") [INFO] [stdout] 475 | | || (!lower.contains("trade") && !lower.contains("opportunity"))); [INFO] [stdout] | |____________________________________________________________________________________________^ help: try: `(lower.contains("opportunity") || lower.contains("trade")) && !lower.contains("no trade") && !lower.contains("no_trade")` [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: stripping a prefix manually [INFO] [stdout] --> src/services/risk.rs:72:38 [INFO] [stdout] | [INFO] [stdout] 72 | if let Ok(val) = part["tp=".len()..].parse::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/services/risk.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | if part.starts_with("tp=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 71 ~ if let Some() = part.strip_prefix("tp=") { [INFO] [stdout] 72 ~ if let Ok(val) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/services/risk.rs:76:38 [INFO] [stdout] | [INFO] [stdout] 76 | if let Ok(val) = part["sl=".len()..].parse::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/services/risk.rs:75:24 [INFO] [stdout] | [INFO] [stdout] 75 | } else if part.starts_with("sl=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 75 ~ } else if let Some() = part.strip_prefix("sl=") { [INFO] [stdout] 76 ~ if let Ok(val) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/services/strategy.rs:395:5 [INFO] [stdout] | [INFO] [stdout] 395 | / async fn evaluate_hybrid( [INFO] [stdout] 396 | | symbol: String, [INFO] [stdout] 397 | | bid: f64, [INFO] [stdout] 398 | | ask: f64, [INFO] [stdout] ... | [INFO] [stdout] 404 | | config: AppConfig, [INFO] [stdout] 405 | | ) { [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 boolean expression can be simplified [INFO] [stdout] --> src/services/strategy.rs:473:39 [INFO] [stdout] | [INFO] [stdout] 473 | let allowed = !(lower.contains("no_trade") [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 474 | | || lower.contains("no trade") [INFO] [stdout] 475 | | || (!lower.contains("trade") && !lower.contains("opportunity"))); [INFO] [stdout] | |____________________________________________________________________________________________^ help: try: `(lower.contains("opportunity") || lower.contains("trade")) && !lower.contains("no trade") && !lower.contains("no_trade")` [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: module has the same name as its containing module [INFO] [stdout] --> src/services/execution_utils_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod execution_utils_tests { [INFO] [stdout] 5 | | use crate::services::execution_utils::*; [INFO] [stdout] ... | [INFO] [stdout] 358 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/services/reporting_tests.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / mod reporting_tests { [INFO] [stdout] 5 | | use crate::services::reporting::*; [INFO] [stdout] ... | [INFO] [stdout] 359 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/services/reporting_tests.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | summary.total_orders = 100; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `services::reporting::PerformanceSummary { total_orders: 100, buys: 60, sells: 40, filled: 95, rejected: 5, total_notional: 50000.0, winning_trades: 30, losing_trades: 10, total_profit: 500.0, total_loss: 200.0, total_realized_pnl: 300.0, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/services/reporting_tests.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let mut summary = PerformanceSummary::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/services/reporting_tests.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | summary.winning_trades = 7; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `services::reporting::PerformanceSummary { winning_trades: 7, losing_trades: 3, total_profit: 700.0, total_loss: 300.0, total_realized_pnl: 400.0, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/services/reporting_tests.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut summary = PerformanceSummary::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/services/reporting_tests.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | summary.winning_trades = 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `services::reporting::PerformanceSummary { winning_trades: 10, losing_trades: 0, total_profit: 1000.0, total_loss: 0.0, total_realized_pnl: 1000.0, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/services/reporting_tests.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | let mut summary = PerformanceSummary::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/services/reporting_tests.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | summary.winning_trades = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `services::reporting::PerformanceSummary { winning_trades: 0, losing_trades: 10, total_profit: 0.0, total_loss: 500.0, total_realized_pnl: -500.0, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/services/reporting_tests.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | let mut summary = PerformanceSummary::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/services/reporting_tests.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | summary.total_orders = 50; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `services::reporting::PerformanceSummary { total_orders: 50, buys: 30, sells: 20, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/services/reporting_tests.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | let mut summary = PerformanceSummary::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 20s [INFO] running `Command { std: "docker" "inspect" "401c30396b799e1a94aa55231907eb27da8a8d333bed03ca291a508943857e50", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "401c30396b799e1a94aa55231907eb27da8a8d333bed03ca291a508943857e50", kill_on_drop: false }` [INFO] [stdout] 401c30396b799e1a94aa55231907eb27da8a8d333bed03ca291a508943857e50