[INFO] cloning repository https://github.com/okalfaoglu/iqai [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/okalfaoglu/iqai" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fokalfaoglu%2Fiqai", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fokalfaoglu%2Fiqai'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6d7ccc6f31685b4ef9d40630aa447d42804b694c [INFO] linting okalfaoglu/iqai against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fokalfaoglu%2Fiqai" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/okalfaoglu/iqai [INFO] finished tweaking git repo https://github.com/okalfaoglu/iqai [INFO] tweaked toml for git repo https://github.com/okalfaoglu/iqai written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/okalfaoglu/iqai 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/okalfaoglu/iqai 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 git repository `https://github.com/bitbytelabio/tradingview-rs.git` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tempfile v3.26.0 [INFO] [stderr] Downloaded bzip2 v0.6.1 [INFO] [stderr] Downloaded libbz2-rs-sys v0.2.2 [INFO] [stderr] Downloaded sha1 v0.2.0 [INFO] [stderr] Downloaded deflate64 v0.1.11 [INFO] [stderr] Downloaded iso_country v0.1.4 [INFO] [stderr] Downloaded hmac-sha1 v0.1.3 [INFO] [stderr] Downloaded liblzma v0.4.6 [INFO] [stderr] Downloaded iso_currency v0.5.3 [INFO] [stderr] Downloaded cookie_store v0.22.1 [INFO] [stderr] Downloaded ppmd-rust v1.4.0 [INFO] [stderr] Downloaded clap v4.5.60 [INFO] [stderr] Downloaded zip v4.6.1 [INFO] [stderr] Downloaded google-authenticator v0.4.2 [INFO] [stderr] Downloaded tokio-tungstenite v0.27.0 [INFO] [stderr] Downloaded clap_builder v4.5.60 [INFO] [stderr] Downloaded zlib-rs v0.6.3 [INFO] [stderr] Downloaded flexi_logger v0.28.5 [INFO] [stderr] Downloaded liblzma-sys v0.4.5 [INFO] [stderr] Downloaded vc-ltl v5.3.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] b33b0dc49f75802d08e041576a9b05f710bd6a635ef4c3c54f4cca965eecf181 [INFO] running `Command { std: "docker" "start" "-a" "b33b0dc49f75802d08e041576a9b05f710bd6a635ef4c3c54f4cca965eecf181", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b33b0dc49f75802d08e041576a9b05f710bd6a635ef4c3c54f4cca965eecf181", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b33b0dc49f75802d08e041576a9b05f710bd6a635ef4c3c54f4cca965eecf181", kill_on_drop: false }` [INFO] [stdout] b33b0dc49f75802d08e041576a9b05f710bd6a635ef4c3c54f4cca965eecf181 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 3cd5100fa54edc6135391a8f54716a1a81611d4fcf011dea65d566cc37c3c2ce [INFO] running `Command { std: "docker" "start" "-a" "3cd5100fa54edc6135391a8f54716a1a81611d4fcf011dea65d566cc37c3c2ce", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.182 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking subtle v2.6.1 [INFO] [stderr] Checking bitflags v2.11.0 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Compiling zerocopy-derive v0.8.42 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling tokio-macros v2.6.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling zeroize_derive v1.4.3 [INFO] [stderr] Checking futures-channel v0.3.32 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking indexmap v2.13.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling rustls v0.23.37 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking zeroize v1.8.2 [INFO] [stderr] Checking rustls-pki-types v1.14.0 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking zlib-rs v0.6.3 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Compiling time-macros v0.2.27 [INFO] [stderr] Checking deranged v0.5.8 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking sync_wrapper v1.0.2 [INFO] [stderr] Compiling num-rational v0.3.2 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking socket2 v0.6.3 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking flate2 v1.1.9 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Compiling cc v1.2.56 [INFO] [stderr] Compiling darling_core v0.23.0 [INFO] [stderr] Checking rand_core v0.9.5 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking time v0.3.47 [INFO] [stderr] Checking webpki-roots v1.0.6 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Compiling cookie v0.18.1 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking zerocopy v0.8.42 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Checking glob v0.3.3 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking tokio v1.50.0 [INFO] [stderr] Checking nu-ansi-term v0.50.3 [INFO] [stderr] Checking fallible-iterator v0.3.0 [INFO] [stderr] Compiling prettyplease v0.2.37 [INFO] [stderr] Checking data-encoding v2.10.0 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling litrs v1.0.0 [INFO] [stderr] Checking psl-types v2.0.11 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking image v0.23.14 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking getrandom v0.1.16 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Compiling iso_currency v0.5.3 [INFO] [stderr] Compiling document-features v0.2.12 [INFO] [stderr] Checking checked_int_cast v1.0.0 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking bumpalo v3.20.2 [INFO] [stderr] Checking libbz2-rs-sys v0.2.2 [INFO] [stderr] Checking iri-string v0.7.10 [INFO] [stderr] Checking sha1 v0.2.0 [INFO] [stderr] Checking hmac-sha1 v0.1.3 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling openssl-sys v0.9.111 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Compiling libsqlite3-sys v0.28.0 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Compiling liblzma-sys v0.4.5 [INFO] [stderr] Checking bzip2 v0.6.1 [INFO] [stderr] Checking zopfli v0.8.3 [INFO] [stderr] Checking iso_country v0.1.4 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking chrono v0.4.44 [INFO] [stderr] Checking thiserror v2.0.18 [INFO] [stderr] Checking qrcode v0.12.0 [INFO] [stderr] Checking pbkdf2 v0.12.2 [INFO] [stderr] Checking webpki-roots v0.26.11 [INFO] [stderr] Checking safe_arch v0.7.4 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Compiling matrixmultiply v0.3.10 [INFO] [stderr] Checking base32 v0.4.0 [INFO] [stderr] Checking ppmd-rust v1.4.0 [INFO] [stderr] Checking deflate64 v0.1.11 [INFO] [stderr] Compiling openssl v0.10.75 [INFO] [stderr] Compiling native-tls v0.2.18 [INFO] [stderr] Checking constant_time_eq v0.3.1 [INFO] [stderr] Checking wide v0.7.33 [INFO] [stderr] Compiling darling_macro v0.23.0 [INFO] [stderr] Checking jpeg-decoder v0.3.2 [INFO] [stderr] Checking zune-inflate v0.2.54 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking lebe v0.5.3 [INFO] [stderr] Checking urlencoding v2.1.3 [INFO] [stderr] Compiling darling v0.23.0 [INFO] [stderr] Compiling bon-macros v3.9.0 [INFO] [stderr] Checking bit_field v0.10.3 [INFO] [stderr] Checking ttf-parser v0.15.2 [INFO] [stderr] Checking flexi_logger v0.28.5 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking tiff v0.9.1 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking qoi v0.4.1 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking custom_derive v0.1.7 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.10 [INFO] [stderr] Checking conv v0.3.3 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking axum-core v0.4.5 [INFO] [stderr] Checking serde_path_to_error v0.1.20 [INFO] [stderr] Checking simba v0.7.3 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking anstyle-query v1.1.5 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking publicsuffix v2.3.0 [INFO] [stderr] Checking is_terminal_polyfill v1.70.2 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking clap_lex v1.0.0 [INFO] [stderr] Compiling clap_derive v4.5.55 [INFO] [stderr] Checking clap_builder v4.5.60 [INFO] [stderr] Checking cookie_store v0.22.1 [INFO] [stderr] Checking owned_ttf_parser v0.15.2 [INFO] [stderr] Checking rusttype v0.9.3 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Compiling rustls v0.21.12 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking ustr v1.1.0 [INFO] [stderr] Checking exr v1.74.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking hashlink v0.9.1 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking rand_chacha v0.2.2 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Checking tower v0.5.3 [INFO] [stderr] Checking rustls-webpki v0.103.9 [INFO] [stderr] Checking sct v0.7.1 [INFO] [stderr] Checking rustls-webpki v0.101.7 [INFO] [stderr] Checking clap v4.5.60 [INFO] [stderr] Checking google-authenticator v0.4.2 [INFO] [stderr] Checking rand_distr v0.2.2 [INFO] [stderr] Checking liblzma v0.4.6 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tungstenite v0.21.0 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Checking hyper-util v0.1.20 [INFO] [stderr] Checking tokio-tungstenite v0.21.0 [INFO] [stderr] Checking bon v3.9.0 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking nalgebra v0.30.1 [INFO] [stderr] Checking tokio-rustls v0.24.1 [INFO] [stderr] Checking axum v0.7.9 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking zip v4.6.1 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking tungstenite v0.27.0 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking reqwest v0.12.28 [INFO] [stderr] Checking tokio-tungstenite v0.27.0 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking tradingview-rs v0.1.0 (https://github.com/bitbytelabio/tradingview-rs.git?branch=main#406e9a43) [INFO] [stderr] Checking rusqlite v0.31.0 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking hyper-rustls v0.24.2 [INFO] [stderr] Checking reqwest v0.11.27 [INFO] [stderr] Checking iqai-core v0.1.0 (/opt/rustwide/workdir/crates/iqai-core) [INFO] [stderr] Checking imageproc v0.23.0 [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/iqai-core/src/trade_db.rs:458:17 [INFO] [stdout] | [INFO] [stdout] 458 | closed_count: closed_count, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `closed_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/iqai-core/src/trade_db.rs:458:17 [INFO] [stdout] | [INFO] [stdout] 458 | closed_count: closed_count, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `closed_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | / pub fn from_str(s: &str) -> Self { [INFO] [stdout] 51 | | match s.to_lowercase().as_str() { [INFO] [stdout] 52 | | "live" => Self::Live, [INFO] [stdout] 53 | | "dry" => Self::Dry, [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:319:1 [INFO] [stdout] | [INFO] [stdout] 319 | / pub fn signal_from_elliott( [INFO] [stdout] 320 | | source: SignalSource, [INFO] [stdout] 321 | | symbol: &str, [INFO] [stdout] 322 | | timeframe: Timeframe, [INFO] [stdout] ... | [INFO] [stdout] 327 | | score: f64, [INFO] [stdout] 328 | | ) -> TradeSignal { [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:388:52 [INFO] [stdout] | [INFO] [stdout] 388 | pub fn restore_open_positions(&mut self, rows: Vec<(i64, i64, String, String, String, String, f64, f64, f64, f64, f64, String)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:451:24 [INFO] [stdout] | [INFO] [stdout] 451 | for (_, mp) in &self.open_positions { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 451 - for (_, mp) in &self.open_positions { [INFO] [stdout] 451 + for mp in self.open_positions.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:893:65 [INFO] [stdout] | [INFO] [stdout] 893 | let (would_take, _reason) = self.should_take_signal(&signal, available_balance); [INFO] [stdout] | ^^^^^^^ help: change this to: `signal` [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: unnecessarily eager cloning of iterator items [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:913:49 [INFO] [stdout] | [INFO] [stdout] 913 | let opened_this_tick: HashSet = self [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 914 | | .open_positions [INFO] [stdout] 915 | | .keys() [INFO] [stdout] | | ____________________- [INFO] [stdout] 916 | || .cloned() [INFO] [stdout] 917 | || .filter(|k| !keys_before.contains(k)) [INFO] [stdout] | ||_________________________________________________^ [INFO] [stdout] | |_________________________________________________| [INFO] [stdout] | help: try: `.filter(|&k| !keys_before.contains(k)).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] = note: `#[warn(clippy::iter_overeager_cloned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> crates/iqai-core/src/classic_patterns.rs:272:17 [INFO] [stdout] | [INFO] [stdout] 272 | / let mut targets = Vec::new(); [INFO] [stdout] 273 | | targets.push(ClassicPatternTarget { [INFO] [stdout] 274 | | price: mid_low - height, [INFO] [stdout] 275 | | label: "Double Top MM TP1".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 281 | | priority: 2, [INFO] [stdout] 282 | | }); [INFO] [stdout] | |___________________^ help: consider using the `vec![]` macro: `let targets = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> crates/iqai-core/src/classic_patterns.rs:314:17 [INFO] [stdout] | [INFO] [stdout] 314 | / let mut targets = Vec::new(); [INFO] [stdout] 315 | | targets.push(ClassicPatternTarget { [INFO] [stdout] 316 | | price: mid_high + height, [INFO] [stdout] 317 | | label: "Double Bottom MM TP1".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 323 | | priority: 2, [INFO] [stdout] 324 | | }); [INFO] [stdout] | |___________________^ help: consider using the `vec![]` macro: `let targets = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> crates/iqai-core/src/classic_patterns.rs:419:5 [INFO] [stdout] | [INFO] [stdout] 419 | / let mut targets = Vec::new(); [INFO] [stdout] 420 | | targets.push(ClassicPatternTarget { [INFO] [stdout] 421 | | price: rim_avg + depth, [INFO] [stdout] 422 | | label: "Cup&Handle TP1".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 428 | | priority: 2, [INFO] [stdout] 429 | | }); [INFO] [stdout] | |_______^ help: consider using the `vec![]` macro: `let targets = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/iqai-core/src/dip_confluence.rs:95:42 [INFO] [stdout] | [INFO] [stdout] 95 | let in_zone = if is_long { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 96 | | reference_price >= sup - band && reference_price <= sup + band [INFO] [stdout] 97 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/iqai-core/src/dip_confluence.rs:97:24 [INFO] [stdout] | [INFO] [stdout] 97 | } else { [INFO] [stdout] | ________________________^ [INFO] [stdout] 98 | | reference_price >= sup - band && reference_price <= sup + band [INFO] [stdout] 99 | | }; [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: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/dip_confluence.rs:195:25 [INFO] [stdout] | [INFO] [stdout] 195 | let absorption_ok = band_center.map_or(false, |center| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 196 | | let band = atr_val * ABSORPTION_ATR_MARGIN; [INFO] [stdout] 197 | | let band_low = center - band; [INFO] [stdout] 198 | | let band_high = center + band; [INFO] [stdout] ... | [INFO] [stdout] 215 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 195 - let absorption_ok = band_center.map_or(false, |center| { [INFO] [stdout] 195 + let absorption_ok = band_center.is_some_and(|center| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | / pub fn from_str(s: &str) -> Self { [INFO] [stdout] 51 | | match s.to_lowercase().as_str() { [INFO] [stdout] 52 | | "live" => Self::Live, [INFO] [stdout] 53 | | "dry" => Self::Dry, [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/dip_tepe_scoring.rs:288:25 [INFO] [stdout] | [INFO] [stdout] 288 | let support_local = support_zone_from_pivots(candles, pivot_len, atr_val) [INFO] [stdout] | _________________________^ [INFO] [stdout] 289 | | .map_or(false, |(lo, hi)| last >= lo && last <= hi); [INFO] [stdout] | |___________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 289 - .map_or(false, |(lo, hi)| last >= lo && last <= hi); [INFO] [stdout] 289 + .is_some_and(|(lo, hi)| last >= lo && last <= hi); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/dip_tepe_scoring.rs:357:23 [INFO] [stdout] | [INFO] [stdout] 357 | let near_ema200 = ema200.map_or(false, |e| { [INFO] [stdout] | _______________________^ [INFO] [stdout] 358 | | let dist = ((last - e) / e.max(1e-9)).abs(); [INFO] [stdout] 359 | | dist <= 0.01 [INFO] [stdout] 360 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 357 - let near_ema200 = ema200.map_or(false, |e| { [INFO] [stdout] 357 + let near_ema200 = ema200.is_some_and(|e| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/dip_tepe_scoring.rs:383:24 [INFO] [stdout] | [INFO] [stdout] 383 | let bollinger_ok = bb.map_or(false, |(lower, _mid, upper)| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 384 | | if is_long { [INFO] [stdout] 385 | | last <= lower [INFO] [stdout] 386 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 389 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 383 - let bollinger_ok = bb.map_or(false, |(lower, _mid, upper)| { [INFO] [stdout] 383 + let bollinger_ok = bb.is_some_and(|(lower, _mid, upper)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:498:1 [INFO] [stdout] | [INFO] [stdout] 498 | / pub fn validate_impulse_with_w5( [INFO] [stdout] 499 | | w0: f64, [INFO] [stdout] 500 | | w1_high: f64, [INFO] [stdout] 501 | | w1_low: f64, [INFO] [stdout] ... | [INFO] [stdout] 506 | | is_bullish: bool, [INFO] [stdout] 507 | | ) -> ImpulseValidation { [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:599:50 [INFO] [stdout] | [INFO] [stdout] 599 | let all_3wave = inner_counts.iter().all(|&c| c >= 2 && c <= 3); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `(2..=3).contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1022:16 [INFO] [stdout] | [INFO] [stdout] 1022 | let b_ok = b_retrace >= 0.382 && b_retrace <= 0.854; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.382..=0.854).contains(&b_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1025:16 [INFO] [stdout] | [INFO] [stdout] 1025 | let c_ok = c_ratio >= 0.99 && c_ratio <= 1.65; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.99..=1.65).contains(&c_ratio)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1101:67 [INFO] [stdout] | [INFO] [stdout] 1101 | FlatType::Regular => b_ratio >= 0.9 && b_ratio <= 1.05 && c_retrace >= 0.85 && c_retrace <= 1.15, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.85..=1.15).contains(&c_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1101:30 [INFO] [stdout] | [INFO] [stdout] 1101 | FlatType::Regular => b_ratio >= 0.9 && b_ratio <= 1.05 && c_retrace >= 0.85 && c_retrace <= 1.15, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.9..=1.05).contains(&b_ratio)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1103:50 [INFO] [stdout] | [INFO] [stdout] 1103 | FlatType::Running => b_ratio >= 1.236 && c_retrace < 1.0 && c_retrace >= 0.5, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.5..1.0).contains(&c_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1388:16 [INFO] [stdout] | [INFO] [stdout] 1388 | if ratio < 0.50 || ratio > 0.95 { return false; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.50..=0.95).contains(&ratio)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1399:16 [INFO] [stdout] | [INFO] [stdout] 1399 | if ratio < 1.05 || ratio > 2.00 { return false; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(1.05..=2.00).contains(&ratio)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1435:1 [INFO] [stdout] | [INFO] [stdout] 1435 | / pub fn compute_impulse_channel( [INFO] [stdout] 1436 | | t2: i64, [INFO] [stdout] 1437 | | p2: f64, [INFO] [stdout] 1438 | | t3: i64, [INFO] [stdout] ... | [INFO] [stdout] 1443 | | _is_bullish: bool, [INFO] [stdout] 1444 | | ) -> Option { [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 function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:319:1 [INFO] [stdout] | [INFO] [stdout] 319 | / pub fn signal_from_elliott( [INFO] [stdout] 320 | | source: SignalSource, [INFO] [stdout] 321 | | symbol: &str, [INFO] [stdout] 322 | | timeframe: Timeframe, [INFO] [stdout] ... | [INFO] [stdout] 327 | | score: f64, [INFO] [stdout] 328 | | ) -> TradeSignal { [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:388:52 [INFO] [stdout] | [INFO] [stdout] 388 | pub fn restore_open_positions(&mut self, rows: Vec<(i64, i64, String, String, String, String, f64, f64, f64, f64, f64, String)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:451:24 [INFO] [stdout] | [INFO] [stdout] 451 | for (_, mp) in &self.open_positions { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 451 - for (_, mp) in &self.open_positions { [INFO] [stdout] 451 + for mp in self.open_positions.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:893:65 [INFO] [stdout] | [INFO] [stdout] 893 | let (would_take, _reason) = self.should_take_signal(&signal, available_balance); [INFO] [stdout] | ^^^^^^^ help: change this to: `signal` [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: unnecessarily eager cloning of iterator items [INFO] [stdout] --> crates/iqai-core/src/auto_trader.rs:913:49 [INFO] [stdout] | [INFO] [stdout] 913 | let opened_this_tick: HashSet = self [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 914 | | .open_positions [INFO] [stdout] 915 | | .keys() [INFO] [stdout] | | ____________________- [INFO] [stdout] 916 | || .cloned() [INFO] [stdout] 917 | || .filter(|k| !keys_before.contains(k)) [INFO] [stdout] | ||_________________________________________________^ [INFO] [stdout] | |_________________________________________________| [INFO] [stdout] | help: try: `.filter(|&k| !keys_before.contains(k)).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] = note: `#[warn(clippy::iter_overeager_cloned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:546:21 [INFO] [stdout] | [INFO] [stdout] 546 | if is_ph && mini_swing_high.map_or(true, |(h, _)| c.high > h) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 546 - if is_ph && mini_swing_high.map_or(true, |(h, _)| c.high > h) { [INFO] [stdout] 546 + if is_ph && mini_swing_high.is_none_or(|(h, _)| c.high > h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:549:21 [INFO] [stdout] | [INFO] [stdout] 549 | if is_pl && mini_swing_low.map_or(true, |(l, _)| c.low < l) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 549 - if is_pl && mini_swing_low.map_or(true, |(l, _)| c.low < l) { [INFO] [stdout] 549 + if is_pl && mini_swing_low.is_none_or(|(l, _)| c.low < l) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:1108:16 [INFO] [stdout] | [INFO] [stdout] 1108 | if result.extended_wave.map_or(false, |(w, _)| w == 3) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 1108 - if result.extended_wave.map_or(false, |(w, _)| w == 3) { [INFO] [stdout] 1108 + if result.extended_wave.is_some_and(|(w, _)| w == 3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> crates/iqai-core/src/classic_patterns.rs:272:17 [INFO] [stdout] | [INFO] [stdout] 272 | / let mut targets = Vec::new(); [INFO] [stdout] 273 | | targets.push(ClassicPatternTarget { [INFO] [stdout] 274 | | price: mid_low - height, [INFO] [stdout] 275 | | label: "Double Top MM TP1".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 281 | | priority: 2, [INFO] [stdout] 282 | | }); [INFO] [stdout] | |___________________^ help: consider using the `vec![]` macro: `let targets = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> crates/iqai-core/src/classic_patterns.rs:314:17 [INFO] [stdout] | [INFO] [stdout] 314 | / let mut targets = Vec::new(); [INFO] [stdout] 315 | | targets.push(ClassicPatternTarget { [INFO] [stdout] 316 | | price: mid_high + height, [INFO] [stdout] 317 | | label: "Double Bottom MM TP1".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 323 | | priority: 2, [INFO] [stdout] 324 | | }); [INFO] [stdout] | |___________________^ help: consider using the `vec![]` macro: `let targets = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> crates/iqai-core/src/classic_patterns.rs:419:5 [INFO] [stdout] | [INFO] [stdout] 419 | / let mut targets = Vec::new(); [INFO] [stdout] 420 | | targets.push(ClassicPatternTarget { [INFO] [stdout] 421 | | price: rim_avg + depth, [INFO] [stdout] 422 | | label: "Cup&Handle TP1".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 428 | | priority: 2, [INFO] [stdout] 429 | | }); [INFO] [stdout] | |_______^ help: consider using the `vec![]` macro: `let targets = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/iqai-core/src/dip_confluence.rs:95:42 [INFO] [stdout] | [INFO] [stdout] 95 | let in_zone = if is_long { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 96 | | reference_price >= sup - band && reference_price <= sup + band [INFO] [stdout] 97 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/iqai-core/src/dip_confluence.rs:97:24 [INFO] [stdout] | [INFO] [stdout] 97 | } else { [INFO] [stdout] | ________________________^ [INFO] [stdout] 98 | | reference_price >= sup - band && reference_price <= sup + band [INFO] [stdout] 99 | | }; [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: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/dip_confluence.rs:195:25 [INFO] [stdout] | [INFO] [stdout] 195 | let absorption_ok = band_center.map_or(false, |center| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 196 | | let band = atr_val * ABSORPTION_ATR_MARGIN; [INFO] [stdout] 197 | | let band_low = center - band; [INFO] [stdout] 198 | | let band_high = center + band; [INFO] [stdout] ... | [INFO] [stdout] 215 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 195 - let absorption_ok = band_center.map_or(false, |center| { [INFO] [stdout] 195 + let absorption_ok = band_center.is_some_and(|center| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:1484:8 [INFO] [stdout] | [INFO] [stdout] 1484 | if x_retrace < 0.20 || x_retrace > 0.85 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.20..=0.85).contains(&x_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:1566:8 [INFO] [stdout] | [INFO] [stdout] 1566 | if x_retrace < 0.20 || x_retrace > 0.85 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.20..=0.85).contains(&x_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:1606:5 [INFO] [stdout] | [INFO] [stdout] 1606 | x_retrace >= 0.20 && x_retrace <= 0.85 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.20..=0.85).contains(&x_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/dip_tepe_scoring.rs:288:25 [INFO] [stdout] | [INFO] [stdout] 288 | let support_local = support_zone_from_pivots(candles, pivot_len, atr_val) [INFO] [stdout] | _________________________^ [INFO] [stdout] 289 | | .map_or(false, |(lo, hi)| last >= lo && last <= hi); [INFO] [stdout] | |___________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 289 - .map_or(false, |(lo, hi)| last >= lo && last <= hi); [INFO] [stdout] 289 + .is_some_and(|(lo, hi)| last >= lo && last <= hi); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/dip_tepe_scoring.rs:357:23 [INFO] [stdout] | [INFO] [stdout] 357 | let near_ema200 = ema200.map_or(false, |e| { [INFO] [stdout] | _______________________^ [INFO] [stdout] 358 | | let dist = ((last - e) / e.max(1e-9)).abs(); [INFO] [stdout] 359 | | dist <= 0.01 [INFO] [stdout] 360 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 357 - let near_ema200 = ema200.map_or(false, |e| { [INFO] [stdout] 357 + let near_ema200 = ema200.is_some_and(|e| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/dip_tepe_scoring.rs:383:24 [INFO] [stdout] | [INFO] [stdout] 383 | let bollinger_ok = bb.map_or(false, |(lower, _mid, upper)| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 384 | | if is_long { [INFO] [stdout] 385 | | last <= lower [INFO] [stdout] 386 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 389 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 383 - let bollinger_ok = bb.map_or(false, |(lower, _mid, upper)| { [INFO] [stdout] 383 + let bollinger_ok = bb.is_some_and(|(lower, _mid, upper)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `state.w1_high` after checking its variant with `is_some` [INFO] [stdout] --> crates/iqai-core/src/impulse_detector.rs:234:30 [INFO] [stdout] | [INFO] [stdout] 233 | if state.setup_w5.is_none() && state.w1_high.is_some() && state.w2_low.is_some() { [INFO] [stdout] | ----------------------- the check is happening here [INFO] [stdout] 234 | let w1 = state.w1_high.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `state.w2_low` after checking its variant with `is_some` [INFO] [stdout] --> crates/iqai-core/src/impulse_detector.rs:236:30 [INFO] [stdout] | [INFO] [stdout] 233 | if state.setup_w5.is_none() && state.w1_high.is_some() && state.w2_low.is_some() { [INFO] [stdout] | ---------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 236 | let w2 = state.w2_low.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:498:1 [INFO] [stdout] | [INFO] [stdout] 498 | / pub fn validate_impulse_with_w5( [INFO] [stdout] 499 | | w0: f64, [INFO] [stdout] 500 | | w1_high: f64, [INFO] [stdout] 501 | | w1_low: f64, [INFO] [stdout] ... | [INFO] [stdout] 506 | | is_bullish: bool, [INFO] [stdout] 507 | | ) -> ImpulseValidation { [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: the loop variable `i` is only used to index `prices` [INFO] [stdout] --> crates/iqai-core/src/indicators.rs:172:14 [INFO] [stdout] | [INFO] [stdout] 172 | for i in slow..prices.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 172 - for i in slow..prices.len() { [INFO] [stdout] 172 + for in prices.iter().skip(slow) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:599:50 [INFO] [stdout] | [INFO] [stdout] 599 | let all_3wave = inner_counts.iter().all(|&c| c >= 2 && c <= 3); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `(2..=3).contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1022:16 [INFO] [stdout] | [INFO] [stdout] 1022 | let b_ok = b_retrace >= 0.382 && b_retrace <= 0.854; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.382..=0.854).contains(&b_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1025:16 [INFO] [stdout] | [INFO] [stdout] 1025 | let c_ok = c_ratio >= 0.99 && c_ratio <= 1.65; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.99..=1.65).contains(&c_ratio)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1101:67 [INFO] [stdout] | [INFO] [stdout] 1101 | FlatType::Regular => b_ratio >= 0.9 && b_ratio <= 1.05 && c_retrace >= 0.85 && c_retrace <= 1.15, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.85..=1.15).contains(&c_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1101:30 [INFO] [stdout] | [INFO] [stdout] 1101 | FlatType::Regular => b_ratio >= 0.9 && b_ratio <= 1.05 && c_retrace >= 0.85 && c_retrace <= 1.15, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.9..=1.05).contains(&b_ratio)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1103:50 [INFO] [stdout] | [INFO] [stdout] 1103 | FlatType::Running => b_ratio >= 1.236 && c_retrace < 1.0 && c_retrace >= 0.5, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.5..1.0).contains(&c_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is only used to index `candles` [INFO] [stdout] --> crates/iqai-core/src/reversal.rs:263:22 [INFO] [stdout] | [INFO] [stdout] 263 | for k in (j + 1)..end { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 263 - for k in (j + 1)..end { [INFO] [stdout] 263 + for in candles.iter().take(end).skip((j + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is only used to index `candles` [INFO] [stdout] --> crates/iqai-core/src/reversal.rs:283:22 [INFO] [stdout] | [INFO] [stdout] 283 | for k in (j + 1)..end { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 283 - for k in (j + 1)..end { [INFO] [stdout] 283 + for in candles.iter().take(end).skip((j + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/iqai-core/src/signal.rs:210:28 [INFO] [stdout] | [INFO] [stdout] 210 | let sell_allowed = !cfg.restrict_repeated_signals [INFO] [stdout] | ____________________________^ [INFO] [stdout] 211 | | || (state.last_signal != "Sell" [INFO] [stdout] 212 | | || (state.last_signal == "Sell" [INFO] [stdout] 213 | | && restrict_tf_trend != state.last_trend [INFO] [stdout] 214 | | && restrict_tf_trend != -1)); [INFO] [stdout] | |________________________________________________^ help: try: `!cfg.restrict_repeated_signals || state.last_signal != "Sell" || restrict_tf_trend != state.last_trend && restrict_tf_trend != -1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/iqai-core/src/signal.rs:211:16 [INFO] [stdout] | [INFO] [stdout] 211 | || (state.last_signal != "Sell" [INFO] [stdout] | ________________^ [INFO] [stdout] 212 | | || (state.last_signal == "Sell" [INFO] [stdout] 213 | | && restrict_tf_trend != state.last_trend [INFO] [stdout] 214 | | && restrict_tf_trend != -1)); [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 211 - || (state.last_signal != "Sell" [INFO] [stdout] 212 - || (state.last_signal == "Sell" [INFO] [stdout] 213 - && restrict_tf_trend != state.last_trend [INFO] [stdout] 214 - && restrict_tf_trend != -1)); [INFO] [stdout] 211 + || (restrict_tf_trend != -1 || state.last_signal != "Sell") && (restrict_tf_trend != state.last_trend || state.last_signal != "Sell"); [INFO] [stdout] | [INFO] [stdout] 211 - || (state.last_signal != "Sell" [INFO] [stdout] 212 - || (state.last_signal == "Sell" [INFO] [stdout] 213 - && restrict_tf_trend != state.last_trend [INFO] [stdout] 214 - && restrict_tf_trend != -1)); [INFO] [stdout] 211 + || state.last_signal != "Sell" || restrict_tf_trend != state.last_trend && restrict_tf_trend != -1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/iqai-core/src/signal.rs:215:27 [INFO] [stdout] | [INFO] [stdout] 215 | let buy_allowed = !cfg.restrict_repeated_signals [INFO] [stdout] | ___________________________^ [INFO] [stdout] 216 | | || (state.last_signal != "Buy" [INFO] [stdout] 217 | | || (state.last_signal == "Buy" [INFO] [stdout] 218 | | && restrict_tf_trend != state.last_trend [INFO] [stdout] 219 | | && restrict_tf_trend != 1)); [INFO] [stdout] | |_______________________________________________^ help: try: `!cfg.restrict_repeated_signals || state.last_signal != "Buy" || restrict_tf_trend != state.last_trend && restrict_tf_trend != 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/iqai-core/src/signal.rs:216:16 [INFO] [stdout] | [INFO] [stdout] 216 | || (state.last_signal != "Buy" [INFO] [stdout] | ________________^ [INFO] [stdout] 217 | | || (state.last_signal == "Buy" [INFO] [stdout] 218 | | && restrict_tf_trend != state.last_trend [INFO] [stdout] 219 | | && restrict_tf_trend != 1)); [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 216 - || (state.last_signal != "Buy" [INFO] [stdout] 217 - || (state.last_signal == "Buy" [INFO] [stdout] 218 - && restrict_tf_trend != state.last_trend [INFO] [stdout] 219 - && restrict_tf_trend != 1)); [INFO] [stdout] 216 + || (restrict_tf_trend != 1 || state.last_signal != "Buy") && (restrict_tf_trend != state.last_trend || state.last_signal != "Buy"); [INFO] [stdout] | [INFO] [stdout] 216 - || (state.last_signal != "Buy" [INFO] [stdout] 217 - || (state.last_signal == "Buy" [INFO] [stdout] 218 - && restrict_tf_trend != state.last_trend [INFO] [stdout] 219 - && restrict_tf_trend != 1)); [INFO] [stdout] 216 + || state.last_signal != "Buy" || restrict_tf_trend != state.last_trend && restrict_tf_trend != 1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1388:16 [INFO] [stdout] | [INFO] [stdout] 1388 | if ratio < 0.50 || ratio > 0.95 { return false; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.50..=0.95).contains(&ratio)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1399:16 [INFO] [stdout] | [INFO] [stdout] 1399 | if ratio < 1.05 || ratio > 2.00 { return false; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(1.05..=2.00).contains(&ratio)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-core/src/elliott.rs:1435:1 [INFO] [stdout] | [INFO] [stdout] 1435 | / pub fn compute_impulse_channel( [INFO] [stdout] 1436 | | t2: i64, [INFO] [stdout] 1437 | | p2: f64, [INFO] [stdout] 1438 | | t3: i64, [INFO] [stdout] ... | [INFO] [stdout] 1443 | | _is_bullish: bool, [INFO] [stdout] 1444 | | ) -> Option { [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: `(20)` is never smaller than `1` and has therefore no effect [INFO] [stdout] --> crates/iqai-core/src/signal.rs:301:22 [INFO] [stdout] | [INFO] [stdout] 301 | let period = (20).max(1).min(closes.len()); // Pine: ta.ema(close, 20); 1 bar ile period=1 [INFO] [stdout] | ^^^^^^^^^^^ help: try: `(20)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-core/src/signal.rs:343:5 [INFO] [stdout] | [INFO] [stdout] 343 | / pub fn compute_position_metrics( [INFO] [stdout] 344 | | &self, [INFO] [stdout] 345 | | buffer: &CandleBuffer, [INFO] [stdout] 346 | | chart_tf: Timeframe, [INFO] [stdout] ... | [INFO] [stdout] 351 | | take_profit: Option, [INFO] [stdout] 352 | | ) -> Option { [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: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/iqai-core/src/signal.rs:403:28 [INFO] [stdout] | [INFO] [stdout] 403 | let effective_sl = stop_loss.unwrap_or_else(|| { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 404 | | if dir_sign >= 0.0 { [INFO] [stdout] 405 | | effective_entry - 1.5 * atr_val [INFO] [stdout] 406 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 409 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 403 ~ let effective_sl = stop_loss.unwrap_or({ [INFO] [stdout] 404 + if dir_sign >= 0.0 { [INFO] [stdout] 405 + effective_entry - 1.5 * atr_val [INFO] [stdout] 406 + } else { [INFO] [stdout] 407 + effective_entry + 1.5 * atr_val [INFO] [stdout] 408 + } [INFO] [stdout] 409 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/iqai-core/src/signal.rs:411:28 [INFO] [stdout] | [INFO] [stdout] 411 | let effective_tp = take_profit.unwrap_or_else(|| { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 412 | | if dir_sign >= 0.0 { [INFO] [stdout] 413 | | effective_entry + self.config.q_min_rr * risk [INFO] [stdout] 414 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 417 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 411 ~ let effective_tp = take_profit.unwrap_or({ [INFO] [stdout] 412 + if dir_sign >= 0.0 { [INFO] [stdout] 413 + effective_entry + self.config.q_min_rr * risk [INFO] [stdout] 414 + } else { [INFO] [stdout] 415 + effective_entry - self.config.q_min_rr * risk [INFO] [stdout] 416 + } [INFO] [stdout] 417 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/iqai-core/src/signal.rs:456:29 [INFO] [stdout] | [INFO] [stdout] 456 | let inferred_side = side.unwrap_or_else(|| { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 457 | | if trend_strength >= 0.0 { [INFO] [stdout] 458 | | SignalType::Buy [INFO] [stdout] 459 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 462 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 456 ~ let inferred_side = side.unwrap_or({ [INFO] [stdout] 457 + if trend_strength >= 0.0 { [INFO] [stdout] 458 + SignalType::Buy [INFO] [stdout] 459 + } else { [INFO] [stdout] 460 + SignalType::Sell [INFO] [stdout] 461 + } [INFO] [stdout] 462 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-core/src/signal.rs:553:5 [INFO] [stdout] | [INFO] [stdout] 553 | / fn structure_based_tp( [INFO] [stdout] 554 | | &self, [INFO] [stdout] 555 | | candles: &[Candle], [INFO] [stdout] 556 | | side: SignalType, [INFO] [stdout] ... | [INFO] [stdout] 561 | | pivot_len: usize, [INFO] [stdout] 562 | | ) -> Option { [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 function has too many arguments (9/7) [INFO] [stdout] --> crates/iqai-core/src/trade_db.rs:275:5 [INFO] [stdout] | [INFO] [stdout] 275 | / pub fn insert_daily_summary( [INFO] [stdout] 276 | | &self, [INFO] [stdout] 277 | | date: &str, [INFO] [stdout] 278 | | total_trades: usize, [INFO] [stdout] ... | [INFO] [stdout] 284 | | mode: TradingMode, [INFO] [stdout] 285 | | ) -> SqlResult<()> { [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/iqai-core/src/trade_db.rs:296:61 [INFO] [stdout] | [INFO] [stdout] 296 | ...: TradingMode) -> SqlResult> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/iqai-core/src/trade_db.rs:417:28 [INFO] [stdout] | [INFO] [stdout] 417 | let mut by_symbol: std::collections::HashMap = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> crates/iqai-core/src/types.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | / pub fn from_str(s: &str) -> Option { [INFO] [stdout] 60 | | match s.to_uppercase().as_str() { [INFO] [stdout] 61 | | "1M" | "1m" => Some(Timeframe::M1), [INFO] [stdout] 62 | | "5M" | "5m" => Some(Timeframe::M5), [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:546:21 [INFO] [stdout] | [INFO] [stdout] 546 | if is_ph && mini_swing_high.map_or(true, |(h, _)| c.high > h) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 546 - if is_ph && mini_swing_high.map_or(true, |(h, _)| c.high > h) { [INFO] [stdout] 546 + if is_ph && mini_swing_high.is_none_or(|(h, _)| c.high > h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:549:21 [INFO] [stdout] | [INFO] [stdout] 549 | if is_pl && mini_swing_low.map_or(true, |(l, _)| c.low < l) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 549 - if is_pl && mini_swing_low.map_or(true, |(l, _)| c.low < l) { [INFO] [stdout] 549 + if is_pl && mini_swing_low.is_none_or(|(l, _)| c.low < l) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:1108:16 [INFO] [stdout] | [INFO] [stdout] 1108 | if result.extended_wave.map_or(false, |(w, _)| w == 3) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 1108 - if result.extended_wave.map_or(false, |(w, _)| w == 3) { [INFO] [stdout] 1108 + if result.extended_wave.is_some_and(|(w, _)| w == 3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:1484:8 [INFO] [stdout] | [INFO] [stdout] 1484 | if x_retrace < 0.20 || x_retrace > 0.85 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.20..=0.85).contains(&x_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:1566:8 [INFO] [stdout] | [INFO] [stdout] 1566 | if x_retrace < 0.20 || x_retrace > 0.85 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.20..=0.85).contains(&x_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-core/src/elliott_detector.rs:1606:5 [INFO] [stdout] | [INFO] [stdout] 1606 | x_retrace >= 0.20 && x_retrace <= 0.85 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.20..=0.85).contains(&x_retrace)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `state.w1_high` after checking its variant with `is_some` [INFO] [stdout] --> crates/iqai-core/src/impulse_detector.rs:234:30 [INFO] [stdout] | [INFO] [stdout] 233 | if state.setup_w5.is_none() && state.w1_high.is_some() && state.w2_low.is_some() { [INFO] [stdout] | ----------------------- the check is happening here [INFO] [stdout] 234 | let w1 = state.w1_high.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `state.w2_low` after checking its variant with `is_some` [INFO] [stdout] --> crates/iqai-core/src/impulse_detector.rs:236:30 [INFO] [stdout] | [INFO] [stdout] 233 | if state.setup_w5.is_none() && state.w1_high.is_some() && state.w2_low.is_some() { [INFO] [stdout] | ---------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 236 | let w2 = state.w2_low.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `prices` [INFO] [stdout] --> crates/iqai-core/src/indicators.rs:172:14 [INFO] [stdout] | [INFO] [stdout] 172 | for i in slow..prices.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 172 - for i in slow..prices.len() { [INFO] [stdout] 172 + for in prices.iter().skip(slow) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is only used to index `candles` [INFO] [stdout] --> crates/iqai-core/src/reversal.rs:263:22 [INFO] [stdout] | [INFO] [stdout] 263 | for k in (j + 1)..end { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 263 - for k in (j + 1)..end { [INFO] [stdout] 263 + for in candles.iter().take(end).skip((j + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is only used to index `candles` [INFO] [stdout] --> crates/iqai-core/src/reversal.rs:283:22 [INFO] [stdout] | [INFO] [stdout] 283 | for k in (j + 1)..end { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 283 - for k in (j + 1)..end { [INFO] [stdout] 283 + for in candles.iter().take(end).skip((j + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/iqai-core/src/signal.rs:210:28 [INFO] [stdout] | [INFO] [stdout] 210 | let sell_allowed = !cfg.restrict_repeated_signals [INFO] [stdout] | ____________________________^ [INFO] [stdout] 211 | | || (state.last_signal != "Sell" [INFO] [stdout] 212 | | || (state.last_signal == "Sell" [INFO] [stdout] 213 | | && restrict_tf_trend != state.last_trend [INFO] [stdout] 214 | | && restrict_tf_trend != -1)); [INFO] [stdout] | |________________________________________________^ help: try: `!cfg.restrict_repeated_signals || state.last_signal != "Sell" || restrict_tf_trend != state.last_trend && restrict_tf_trend != -1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/iqai-core/src/signal.rs:211:16 [INFO] [stdout] | [INFO] [stdout] 211 | || (state.last_signal != "Sell" [INFO] [stdout] | ________________^ [INFO] [stdout] 212 | | || (state.last_signal == "Sell" [INFO] [stdout] 213 | | && restrict_tf_trend != state.last_trend [INFO] [stdout] 214 | | && restrict_tf_trend != -1)); [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 211 - || (state.last_signal != "Sell" [INFO] [stdout] 212 - || (state.last_signal == "Sell" [INFO] [stdout] 213 - && restrict_tf_trend != state.last_trend [INFO] [stdout] 214 - && restrict_tf_trend != -1)); [INFO] [stdout] 211 + || (restrict_tf_trend != -1 || state.last_signal != "Sell") && (restrict_tf_trend != state.last_trend || state.last_signal != "Sell"); [INFO] [stdout] | [INFO] [stdout] 211 - || (state.last_signal != "Sell" [INFO] [stdout] 212 - || (state.last_signal == "Sell" [INFO] [stdout] 213 - && restrict_tf_trend != state.last_trend [INFO] [stdout] 214 - && restrict_tf_trend != -1)); [INFO] [stdout] 211 + || state.last_signal != "Sell" || restrict_tf_trend != state.last_trend && restrict_tf_trend != -1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/iqai-core/src/signal.rs:215:27 [INFO] [stdout] | [INFO] [stdout] 215 | let buy_allowed = !cfg.restrict_repeated_signals [INFO] [stdout] | ___________________________^ [INFO] [stdout] 216 | | || (state.last_signal != "Buy" [INFO] [stdout] 217 | | || (state.last_signal == "Buy" [INFO] [stdout] 218 | | && restrict_tf_trend != state.last_trend [INFO] [stdout] 219 | | && restrict_tf_trend != 1)); [INFO] [stdout] | |_______________________________________________^ help: try: `!cfg.restrict_repeated_signals || state.last_signal != "Buy" || restrict_tf_trend != state.last_trend && restrict_tf_trend != 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/iqai-core/src/signal.rs:216:16 [INFO] [stdout] | [INFO] [stdout] 216 | || (state.last_signal != "Buy" [INFO] [stdout] | ________________^ [INFO] [stdout] 217 | | || (state.last_signal == "Buy" [INFO] [stdout] 218 | | && restrict_tf_trend != state.last_trend [INFO] [stdout] 219 | | && restrict_tf_trend != 1)); [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 216 - || (state.last_signal != "Buy" [INFO] [stdout] 217 - || (state.last_signal == "Buy" [INFO] [stdout] 218 - && restrict_tf_trend != state.last_trend [INFO] [stdout] 219 - && restrict_tf_trend != 1)); [INFO] [stdout] 216 + || (restrict_tf_trend != 1 || state.last_signal != "Buy") && (restrict_tf_trend != state.last_trend || state.last_signal != "Buy"); [INFO] [stdout] | [INFO] [stdout] 216 - || (state.last_signal != "Buy" [INFO] [stdout] 217 - || (state.last_signal == "Buy" [INFO] [stdout] 218 - && restrict_tf_trend != state.last_trend [INFO] [stdout] 219 - && restrict_tf_trend != 1)); [INFO] [stdout] 216 + || state.last_signal != "Buy" || restrict_tf_trend != state.last_trend && restrict_tf_trend != 1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> crates/iqai-core/src/strategy.rs:303:40 [INFO] [stdout] | [INFO] [stdout] 303 | let mut longs: Vec = plans [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 304 | | .iter() [INFO] [stdout] | | ________________- [INFO] [stdout] 305 | || .cloned() [INFO] [stdout] 306 | || .filter(|p| matches!(p.direction, StrategyDirection::Long)) [INFO] [stdout] | ||___________________________________________________________________^ [INFO] [stdout] | |___________________________________________________________________| [INFO] [stdout] | help: try: `.filter(|&p| matches!(p.direction, StrategyDirection::Long)).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> crates/iqai-core/src/strategy.rs:308:41 [INFO] [stdout] | [INFO] [stdout] 308 | let mut shorts: Vec = plans [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 309 | | .iter() [INFO] [stdout] | | ________________- [INFO] [stdout] 310 | || .cloned() [INFO] [stdout] 311 | || .filter(|p| matches!(p.direction, StrategyDirection::Short)) [INFO] [stdout] | ||____________________________________________________________________^ [INFO] [stdout] | |____________________________________________________________________| [INFO] [stdout] | help: try: `.filter(|&p| matches!(p.direction, StrategyDirection::Short)).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> crates/iqai-core/src/strategy.rs:358:27 [INFO] [stdout] | [INFO] [stdout] 358 | let macro_candidate = plans.iter().cloned().find(|p| { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 359 | | matches!(p.classic_pattern_kind, Some(ClassicPatternKind::CupAndHandle)) [INFO] [stdout] 360 | | || p [INFO] [stdout] 361 | | .elliott_formation [INFO] [stdout] ... | [INFO] [stdout] 365 | | || matches!(p.timeframe, Timeframe::H4 | Timeframe::D1) [INFO] [stdout] 366 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 358 ~ let macro_candidate = plans.iter().find(|&p| { [INFO] [stdout] 359 + matches!(p.classic_pattern_kind, Some(ClassicPatternKind::CupAndHandle)) [INFO] [stdout] 360 + || p [INFO] [stdout] 361 + .elliott_formation [INFO] [stdout] 362 + .as_deref() [INFO] [stdout] 363 + .map(|s| s.to_lowercase().contains("flat") || s.to_lowercase().contains("triangle")) [INFO] [stdout] 364 + .unwrap_or(false) [INFO] [stdout] 365 + || matches!(p.timeframe, Timeframe::H4 | Timeframe::D1) [INFO] [stdout] 366 ~ }).cloned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `(20)` is never smaller than `1` and has therefore no effect [INFO] [stdout] --> crates/iqai-core/src/signal.rs:301:22 [INFO] [stdout] | [INFO] [stdout] 301 | let period = (20).max(1).min(closes.len()); // Pine: ta.ema(close, 20); 1 bar ile period=1 [INFO] [stdout] | ^^^^^^^^^^^ help: try: `(20)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-core/src/signal.rs:343:5 [INFO] [stdout] | [INFO] [stdout] 343 | / pub fn compute_position_metrics( [INFO] [stdout] 344 | | &self, [INFO] [stdout] 345 | | buffer: &CandleBuffer, [INFO] [stdout] 346 | | chart_tf: Timeframe, [INFO] [stdout] ... | [INFO] [stdout] 351 | | take_profit: Option, [INFO] [stdout] 352 | | ) -> Option { [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: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/iqai-core/src/signal.rs:403:28 [INFO] [stdout] | [INFO] [stdout] 403 | let effective_sl = stop_loss.unwrap_or_else(|| { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 404 | | if dir_sign >= 0.0 { [INFO] [stdout] 405 | | effective_entry - 1.5 * atr_val [INFO] [stdout] 406 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 409 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 403 ~ let effective_sl = stop_loss.unwrap_or({ [INFO] [stdout] 404 + if dir_sign >= 0.0 { [INFO] [stdout] 405 + effective_entry - 1.5 * atr_val [INFO] [stdout] 406 + } else { [INFO] [stdout] 407 + effective_entry + 1.5 * atr_val [INFO] [stdout] 408 + } [INFO] [stdout] 409 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/iqai-core/src/signal.rs:411:28 [INFO] [stdout] | [INFO] [stdout] 411 | let effective_tp = take_profit.unwrap_or_else(|| { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 412 | | if dir_sign >= 0.0 { [INFO] [stdout] 413 | | effective_entry + self.config.q_min_rr * risk [INFO] [stdout] 414 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 417 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 411 ~ let effective_tp = take_profit.unwrap_or({ [INFO] [stdout] 412 + if dir_sign >= 0.0 { [INFO] [stdout] 413 + effective_entry + self.config.q_min_rr * risk [INFO] [stdout] 414 + } else { [INFO] [stdout] 415 + effective_entry - self.config.q_min_rr * risk [INFO] [stdout] 416 + } [INFO] [stdout] 417 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/iqai-core/src/signal.rs:456:29 [INFO] [stdout] | [INFO] [stdout] 456 | let inferred_side = side.unwrap_or_else(|| { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 457 | | if trend_strength >= 0.0 { [INFO] [stdout] 458 | | SignalType::Buy [INFO] [stdout] 459 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 462 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 456 ~ let inferred_side = side.unwrap_or({ [INFO] [stdout] 457 + if trend_strength >= 0.0 { [INFO] [stdout] 458 + SignalType::Buy [INFO] [stdout] 459 + } else { [INFO] [stdout] 460 + SignalType::Sell [INFO] [stdout] 461 + } [INFO] [stdout] 462 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-core/src/signal.rs:553:5 [INFO] [stdout] | [INFO] [stdout] 553 | / fn structure_based_tp( [INFO] [stdout] 554 | | &self, [INFO] [stdout] 555 | | candles: &[Candle], [INFO] [stdout] 556 | | side: SignalType, [INFO] [stdout] ... | [INFO] [stdout] 561 | | pivot_len: usize, [INFO] [stdout] 562 | | ) -> Option { [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 `if` has identical blocks [INFO] [stdout] --> crates/iqai-core/src/strategy_engine.rs:117:41 [INFO] [stdout] | [INFO] [stdout] 117 | let best_price = if is_long { entry_price } else { entry_price }; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/iqai-core/src/strategy_engine.rs:117:62 [INFO] [stdout] | [INFO] [stdout] 117 | let best_price = if is_long { entry_price } else { entry_price }; [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] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> crates/iqai-core/src/trade_db.rs:275:5 [INFO] [stdout] | [INFO] [stdout] 275 | / pub fn insert_daily_summary( [INFO] [stdout] 276 | | &self, [INFO] [stdout] 277 | | date: &str, [INFO] [stdout] 278 | | total_trades: usize, [INFO] [stdout] ... | [INFO] [stdout] 284 | | mode: TradingMode, [INFO] [stdout] 285 | | ) -> SqlResult<()> { [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/iqai-core/src/trade_db.rs:296:61 [INFO] [stdout] | [INFO] [stdout] 296 | ...: TradingMode) -> SqlResult> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/iqai-core/src/trade_db.rs:417:28 [INFO] [stdout] | [INFO] [stdout] 417 | let mut by_symbol: std::collections::HashMap = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> crates/iqai-core/src/types.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | / pub fn from_str(s: &str) -> Option { [INFO] [stdout] 60 | | match s.to_uppercase().as_str() { [INFO] [stdout] 61 | | "1M" | "1m" => Some(Timeframe::M1), [INFO] [stdout] 62 | | "5M" | "5m" => Some(Timeframe::M5), [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> crates/iqai-core/src/strategy.rs:303:40 [INFO] [stdout] | [INFO] [stdout] 303 | let mut longs: Vec = plans [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 304 | | .iter() [INFO] [stdout] | | ________________- [INFO] [stdout] 305 | || .cloned() [INFO] [stdout] 306 | || .filter(|p| matches!(p.direction, StrategyDirection::Long)) [INFO] [stdout] | ||___________________________________________________________________^ [INFO] [stdout] | |___________________________________________________________________| [INFO] [stdout] | help: try: `.filter(|&p| matches!(p.direction, StrategyDirection::Long)).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> crates/iqai-core/src/strategy.rs:308:41 [INFO] [stdout] | [INFO] [stdout] 308 | let mut shorts: Vec = plans [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 309 | | .iter() [INFO] [stdout] | | ________________- [INFO] [stdout] 310 | || .cloned() [INFO] [stdout] 311 | || .filter(|p| matches!(p.direction, StrategyDirection::Short)) [INFO] [stdout] | ||____________________________________________________________________^ [INFO] [stdout] | |____________________________________________________________________| [INFO] [stdout] | help: try: `.filter(|&p| matches!(p.direction, StrategyDirection::Short)).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> crates/iqai-core/src/strategy.rs:358:27 [INFO] [stdout] | [INFO] [stdout] 358 | let macro_candidate = plans.iter().cloned().find(|p| { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 359 | | matches!(p.classic_pattern_kind, Some(ClassicPatternKind::CupAndHandle)) [INFO] [stdout] 360 | | || p [INFO] [stdout] 361 | | .elliott_formation [INFO] [stdout] ... | [INFO] [stdout] 365 | | || matches!(p.timeframe, Timeframe::H4 | Timeframe::D1) [INFO] [stdout] 366 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 358 ~ let macro_candidate = plans.iter().find(|&p| { [INFO] [stdout] 359 + matches!(p.classic_pattern_kind, Some(ClassicPatternKind::CupAndHandle)) [INFO] [stdout] 360 + || p [INFO] [stdout] 361 + .elliott_formation [INFO] [stdout] 362 + .as_deref() [INFO] [stdout] 363 + .map(|s| s.to_lowercase().contains("flat") || s.to_lowercase().contains("triangle")) [INFO] [stdout] 364 + .unwrap_or(false) [INFO] [stdout] 365 + || matches!(p.timeframe, Timeframe::H4 | Timeframe::D1) [INFO] [stdout] 366 ~ }).cloned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking iqai-binance v0.1.0 (/opt/rustwide/workdir/crates/iqai-binance) [INFO] [stderr] Checking iqai-tv v0.1.0 (/opt/rustwide/workdir/crates/iqai-tv) [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/iqai-core/src/strategy_engine.rs:117:41 [INFO] [stdout] | [INFO] [stdout] 117 | let best_price = if is_long { entry_price } else { entry_price }; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/iqai-core/src/strategy_engine.rs:117:62 [INFO] [stdout] | [INFO] [stdout] 117 | let best_price = if is_long { entry_price } else { entry_price }; [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] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> crates/iqai-tv/src/client.rs:403:62 [INFO] [stdout] | [INFO] [stdout] 403 | .map_err(|e| ExchangeError::Http(e.to_string()))? [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 404 | | .map_err(|e| e), [INFO] [stdout] | |___________________________^ help: remove the call to `map_err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> crates/iqai-tv/src/native.rs:115:18 [INFO] [stdout] | [INFO] [stdout] 115 | let n_bars = n_bars.min(5000).max(1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `n_bars.clamp(1, 5000)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-tv/src/native.rs:254:16 [INFO] [stdout] | [INFO] [stdout] 254 | if time_ms < MIN_MS || time_ms > MAX_MS { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(MIN_MS..=MAX_MS).contains(&time_ms)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `k.get(0)` [INFO] [stdout] --> crates/iqai-binance/src/spot.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | let t = k.get(0)?.as_i64()?; [INFO] [stdout] | ^^^^^^^^ help: try: `k.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: accessing first element with `k.get(0)` [INFO] [stdout] --> crates/iqai-binance/src/futures.rs:231:17 [INFO] [stdout] | [INFO] [stdout] 231 | let t = k.get(0)?.as_i64()?; [INFO] [stdout] | ^^^^^^^^ help: try: `k.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> crates/iqai-binance/src/futures.rs:497:21 [INFO] [stdout] | [INFO] [stdout] 497 | let query = format!( [INFO] [stdout] | _____________________^ [INFO] [stdout] 498 | | "symbol={}&side={}&type=LIMIT&timeInForce=IOC&quantity={}&price={}×tamp={}", [INFO] [stdout] 499 | | symbol_upper, [INFO] [stdout] 500 | | side_str, [INFO] [stdout] ... | [INFO] [stdout] 503 | | ts [INFO] [stdout] 504 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `k.get(0)` [INFO] [stdout] --> crates/iqai-binance/src/spot.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | let t = k.get(0)?.as_i64()?; [INFO] [stdout] | ^^^^^^^^ help: try: `k.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: unnecessary map of the identity function [INFO] [stdout] --> crates/iqai-tv/src/client.rs:403:62 [INFO] [stdout] | [INFO] [stdout] 403 | .map_err(|e| ExchangeError::Http(e.to_string()))? [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 404 | | .map_err(|e| e), [INFO] [stdout] | |___________________________^ help: remove the call to `map_err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `k.get(0)` [INFO] [stdout] --> crates/iqai-binance/src/futures.rs:231:17 [INFO] [stdout] | [INFO] [stdout] 231 | let t = k.get(0)?.as_i64()?; [INFO] [stdout] | ^^^^^^^^ help: try: `k.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> crates/iqai-tv/src/native.rs:115:18 [INFO] [stdout] | [INFO] [stdout] 115 | let n_bars = n_bars.min(5000).max(1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `n_bars.clamp(1, 5000)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> crates/iqai-tv/src/native.rs:254:16 [INFO] [stdout] | [INFO] [stdout] 254 | if time_ms < MIN_MS || time_ms > MAX_MS { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(MIN_MS..=MAX_MS).contains(&time_ms)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> crates/iqai-binance/src/futures.rs:497:21 [INFO] [stdout] | [INFO] [stdout] 497 | let query = format!( [INFO] [stdout] | _____________________^ [INFO] [stdout] 498 | | "symbol={}&side={}&type=LIMIT&timeInForce=IOC&quantity={}&price={}×tamp={}", [INFO] [stdout] 499 | | symbol_upper, [INFO] [stdout] 500 | | side_str, [INFO] [stdout] ... | [INFO] [stdout] 503 | | ts [INFO] [stdout] 504 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking iqai-web v0.1.0 (/opt/rustwide/workdir/crates/iqai-web) [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:477:17 [INFO] [stdout] | [INFO] [stdout] 477 | (lowest_y2 - lowest_y1) as f64 / dt_sec as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((lowest_y2 - lowest_y1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:497:17 [INFO] [stdout] | [INFO] [stdout] 497 | (highest_y2 - highest_y1) as f64 / dt_sec as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((highest_y2 - highest_y1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:538:46 [INFO] [stdout] | [INFO] [stdout] 538 | let start = anchor_time + gap_bars * bar_sec as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `bar_sec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:539:38 [INFO] [stdout] | [INFO] [stdout] 539 | let end = start + len_bars * bar_sec as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `bar_sec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:659:13 [INFO] [stdout] | [INFO] [stdout] 659 | (prd - prb) as f64 / dt_upper as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `((prd - prb))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:666:13 [INFO] [stdout] | [INFO] [stdout] 666 | (prc - pra) as f64 / dt_lower as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `((prc - pra))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:715:13 [INFO] [stdout] | [INFO] [stdout] 715 | (upper_p2 - upper_p1) as f64 / dt_u as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((upper_p2 - upper_p1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:722:13 [INFO] [stdout] | [INFO] [stdout] 722 | (lower_p2 - lower_p1) as f64 / dt_l as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((lower_p2 - lower_p1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:762:27 [INFO] [stdout] | [INFO] [stdout] 762 | let upper_t2 = p5.map(|p| t_sec(p)).unwrap_or(t3); [INFO] [stdout] | ^^^^^^^^^^^^ help: replace the closure with the function itself: `t_sec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:763:28 [INFO] [stdout] | [INFO] [stdout] 763 | let upper_pr2 = p5.map(|p| pr(p)).unwrap_or(pr3); [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with the function itself: `pr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:766:9 [INFO] [stdout] | [INFO] [stdout] 766 | (upper_pr2 - pr1) as f64 / dt_u as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((upper_pr2 - pr1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:773:9 [INFO] [stdout] | [INFO] [stdout] 773 | (pr4 - pr2) as f64 / dt_l as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `((pr4 - pr2))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/iqai-web/src/notify.rs:365:29 [INFO] [stdout] | [INFO] [stdout] 365 | .unwrap_or_else(|| String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `anyhow::Error` [INFO] [stdout] --> crates/iqai-web/src/notify.rs:418:40 [INFO] [stdout] | [INFO] [stdout] 418 | ... return Err(e.into()); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:477:17 [INFO] [stdout] | [INFO] [stdout] 477 | (lowest_y2 - lowest_y1) as f64 / dt_sec as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((lowest_y2 - lowest_y1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:497:17 [INFO] [stdout] | [INFO] [stdout] 497 | (highest_y2 - highest_y1) as f64 / dt_sec as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((highest_y2 - highest_y1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:538:46 [INFO] [stdout] | [INFO] [stdout] 538 | let start = anchor_time + gap_bars * bar_sec as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `bar_sec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:539:38 [INFO] [stdout] | [INFO] [stdout] 539 | let end = start + len_bars * bar_sec as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `bar_sec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:659:13 [INFO] [stdout] | [INFO] [stdout] 659 | (prd - prb) as f64 / dt_upper as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `((prd - prb))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:666:13 [INFO] [stdout] | [INFO] [stdout] 666 | (prc - pra) as f64 / dt_lower as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `((prc - pra))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:715:13 [INFO] [stdout] | [INFO] [stdout] 715 | (upper_p2 - upper_p1) as f64 / dt_u as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((upper_p2 - upper_p1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:722:13 [INFO] [stdout] | [INFO] [stdout] 722 | (lower_p2 - lower_p1) as f64 / dt_l as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((lower_p2 - lower_p1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:762:27 [INFO] [stdout] | [INFO] [stdout] 762 | let upper_t2 = p5.map(|p| t_sec(p)).unwrap_or(t3); [INFO] [stdout] | ^^^^^^^^^^^^ help: replace the closure with the function itself: `t_sec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:763:28 [INFO] [stdout] | [INFO] [stdout] 763 | let upper_pr2 = p5.map(|p| pr(p)).unwrap_or(pr3); [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with the function itself: `pr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:766:9 [INFO] [stdout] | [INFO] [stdout] 766 | (upper_pr2 - pr1) as f64 / dt_u as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((upper_pr2 - pr1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> crates/iqai-web/src/chart_data.rs:773:9 [INFO] [stdout] | [INFO] [stdout] 773 | (pr4 - pr2) as f64 / dt_l as f64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `((pr4 - pr2))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/iqai-web/src/notify.rs:365:29 [INFO] [stdout] | [INFO] [stdout] 365 | .unwrap_or_else(|| String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `anyhow::Error` [INFO] [stdout] --> crates/iqai-web/src/notify.rs:418:40 [INFO] [stdout] | [INFO] [stdout] 418 | ... return Err(e.into()); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking iqai-cli v0.1.0 (/opt/rustwide/workdir/crates/iqai-cli) [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/iqai-web/src/main.rs:231:5 [INFO] [stdout] | [INFO] [stdout] 231 | /// GET /api/q-analiz/snapshot?symbol=ETHUSDT&tf=5m [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 231 | /// GET /api/q-analiz/snapshot?symbol=ETHUSDT&tf=5m [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> crates/iqai-web/src/main.rs:540:10 [INFO] [stdout] | [INFO] [stdout] 540 | .map(|_| { [INFO] [stdout] | __________^ [INFO] [stdout] 541 | | // If user passes ?entry&sl but no explicit side, infer from entry vs SL. [INFO] [stdout] 542 | | // Long: entry > sl, Short: entry < sl. [INFO] [stdout] 543 | | if let (Ok(entry), Ok(sl)) = [INFO] [stdout] ... | [INFO] [stdout] 556 | | }) [INFO] [stdout] 557 | | .flatten(); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `and_then` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 540 ~ .and_then(|_| { [INFO] [stdout] 541 + // If user passes ?entry&sl but no explicit side, infer from entry vs SL. [INFO] [stdout] 542 + // Long: entry > sl, Short: entry < sl. [INFO] [stdout] 543 + if let (Ok(entry), Ok(sl)) = [INFO] [stdout] 544 + (params.entry.as_deref().unwrap_or("").parse::(), params.sl.as_deref().unwrap_or("").parse::()) [INFO] [stdout] 545 + { [INFO] [stdout] 546 + if entry > sl { [INFO] [stdout] 547 + Some(SignalType::Buy) [INFO] [stdout] 548 + } else if entry < sl { [INFO] [stdout] 549 + Some(SignalType::Sell) [INFO] [stdout] 550 + } else { [INFO] [stdout] 551 + None [INFO] [stdout] 552 + } [INFO] [stdout] 553 + } else { [INFO] [stdout] 554 + None [INFO] [stdout] 555 + } [INFO] [stdout] 556 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> crates/iqai-web/src/main.rs:231:5 [INFO] [stdout] | [INFO] [stdout] 231 | /// GET /api/q-analiz/snapshot?symbol=ETHUSDT&tf=5m [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 231 | /// GET /api/q-analiz/snapshot?symbol=ETHUSDT&tf=5m [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> crates/iqai-web/src/main.rs:540:10 [INFO] [stdout] | [INFO] [stdout] 540 | .map(|_| { [INFO] [stdout] | __________^ [INFO] [stdout] 541 | | // If user passes ?entry&sl but no explicit side, infer from entry vs SL. [INFO] [stdout] 542 | | // Long: entry > sl, Short: entry < sl. [INFO] [stdout] 543 | | if let (Ok(entry), Ok(sl)) = [INFO] [stdout] ... | [INFO] [stdout] 556 | | }) [INFO] [stdout] 557 | | .flatten(); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `and_then` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 540 ~ .and_then(|_| { [INFO] [stdout] 541 + // If user passes ?entry&sl but no explicit side, infer from entry vs SL. [INFO] [stdout] 542 + // Long: entry > sl, Short: entry < sl. [INFO] [stdout] 543 + if let (Ok(entry), Ok(sl)) = [INFO] [stdout] 544 + (params.entry.as_deref().unwrap_or("").parse::(), params.sl.as_deref().unwrap_or("").parse::()) [INFO] [stdout] 545 + { [INFO] [stdout] 546 + if entry > sl { [INFO] [stdout] 547 + Some(SignalType::Buy) [INFO] [stdout] 548 + } else if entry < sl { [INFO] [stdout] 549 + Some(SignalType::Sell) [INFO] [stdout] 550 + } else { [INFO] [stdout] 551 + None [INFO] [stdout] 552 + } [INFO] [stdout] 553 + } else { [INFO] [stdout] 554 + None [INFO] [stdout] 555 + } [INFO] [stdout] 556 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> crates/iqai-cli/src/main.rs:62:19 [INFO] [stdout] | [INFO] [stdout] 62 | "BIST" => hour >= 7 && hour < 15, // 07:00–15:00 UTC [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(7..15).contains(&hour)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> crates/iqai-cli/src/main.rs:63:30 [INFO] [stdout] | [INFO] [stdout] 63 | "NASDAQ" | "NYSE" => hour >= 13 && hour < 21, // ~09:30–16:00 ET [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(13..21).contains(&hour)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> crates/iqai-cli/src/main.rs:62:19 [INFO] [stdout] | [INFO] [stdout] 62 | "BIST" => hour >= 7 && hour < 15, // 07:00–15:00 UTC [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(7..15).contains(&hour)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> crates/iqai-cli/src/main.rs:63:30 [INFO] [stdout] | [INFO] [stdout] 63 | "NASDAQ" | "NYSE" => hour >= 13 && hour < 21, // ~09:30–16:00 ET [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(13..21).contains(&hour)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-cli/src/main.rs:346:1 [INFO] [stdout] | [INFO] [stdout] 346 | / async fn run_scan( [INFO] [stdout] 347 | | symbol: &str, [INFO] [stdout] 348 | | market: &str, [INFO] [stdout] 349 | | exchange: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 354 | | position_side: Option<&str>, [INFO] [stdout] 355 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> crates/iqai-cli/src/main.rs:469:1 [INFO] [stdout] | [INFO] [stdout] 469 | / async fn run_scan_from_buffer( [INFO] [stdout] 470 | | buffer: &CandleBuffer, [INFO] [stdout] 471 | | symbol: &str, [INFO] [stdout] 472 | | market: &str, [INFO] [stdout] ... | [INFO] [stdout] 478 | | position_side: Option<&str>, [INFO] [stdout] 479 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:486:48 [INFO] [stdout] | [INFO] [stdout] 486 | let trend_strength = engine.trend_strength(&buffer); [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [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] --> crates/iqai-cli/src/main.rs:487:47 [INFO] [stdout] | [INFO] [stdout] 487 | let confidence = engine.system_confidence(&buffer); [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-cli/src/main.rs:346:1 [INFO] [stdout] | [INFO] [stdout] 346 | / async fn run_scan( [INFO] [stdout] 347 | | symbol: &str, [INFO] [stdout] 348 | | market: &str, [INFO] [stdout] 349 | | exchange: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 354 | | position_side: Option<&str>, [INFO] [stdout] 355 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:525:42 [INFO] [stdout] | [INFO] [stdout] 525 | let q_radar = engine.compute_q_radar(&buffer, chart_tf, symbol); [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:526:42 [INFO] [stdout] | [INFO] [stdout] 526 | let q_setup = engine.compute_q_setup(&buffer, chart_tf, symbol, q_radar.as_ref()); [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [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 `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> crates/iqai-cli/src/main.rs:590:26 [INFO] [stdout] | [INFO] [stdout] 590 | let tp_for_metrics = q_setup.as_ref().and_then(|q| Some(q.take_profit)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `q_setup.as_ref().map(|q| q.take_profit)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> crates/iqai-cli/src/main.rs:469:1 [INFO] [stdout] | [INFO] [stdout] 469 | / async fn run_scan_from_buffer( [INFO] [stdout] 470 | | buffer: &CandleBuffer, [INFO] [stdout] 471 | | symbol: &str, [INFO] [stdout] 472 | | market: &str, [INFO] [stdout] ... | [INFO] [stdout] 478 | | position_side: Option<&str>, [INFO] [stdout] 479 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:631:52 [INFO] [stdout] | [INFO] [stdout] 631 | let elliott = compute_elliott(candles, &config, false); [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:486:48 [INFO] [stdout] | [INFO] [stdout] 486 | let trend_strength = engine.trend_strength(&buffer); [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [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] --> crates/iqai-cli/src/main.rs:487:47 [INFO] [stdout] | [INFO] [stdout] 487 | let confidence = engine.system_confidence(&buffer); [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:525:42 [INFO] [stdout] | [INFO] [stdout] 525 | let q_radar = engine.compute_q_radar(&buffer, chart_tf, symbol); [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:526:42 [INFO] [stdout] | [INFO] [stdout] 526 | let q_setup = engine.compute_q_setup(&buffer, chart_tf, symbol, q_radar.as_ref()); [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [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 `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> crates/iqai-cli/src/main.rs:590:26 [INFO] [stdout] | [INFO] [stdout] 590 | let tp_for_metrics = q_setup.as_ref().and_then(|q| Some(q.take_profit)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `q_setup.as_ref().map(|q| q.take_profit)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:631:52 [INFO] [stdout] | [INFO] [stdout] 631 | let elliott = compute_elliott(candles, &config, false); [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-cli/src/main.rs:820:1 [INFO] [stdout] | [INFO] [stdout] 820 | / async fn run_watch( [INFO] [stdout] 821 | | symbol: &str, [INFO] [stdout] 822 | | side: &str, [INFO] [stdout] 823 | | entry: f64, [INFO] [stdout] ... | [INFO] [stdout] 828 | | interval_secs: u64, [INFO] [stdout] 829 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> crates/iqai-cli/src/main.rs:820:1 [INFO] [stdout] | [INFO] [stdout] 820 | / async fn run_watch( [INFO] [stdout] 821 | | symbol: &str, [INFO] [stdout] 822 | | side: &str, [INFO] [stdout] 823 | | entry: f64, [INFO] [stdout] ... | [INFO] [stdout] 828 | | interval_secs: u64, [INFO] [stdout] 829 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1015:23 [INFO] [stdout] | [INFO] [stdout] 1015 | let rows: Vec<(i64, i64, String, String, String, String, f64, f64, f64, f64, f64, String)> = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1016:17 [INFO] [stdout] | [INFO] [stdout] 1016 | / match db.load_open_positions(at_cfg.mode) { [INFO] [stdout] 1017 | | Ok(r) => r, [INFO] [stdout] 1018 | | Err(_) => vec![], [INFO] [stdout] 1019 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] help: ascribe the type std::vec::Vec<(i64, i64, std::string::String, std::string::String, std::string::String, std::string::String, f64, f64, f64, f64, f64, std::string::String)> and replace your expression with [INFO] [stdout] | [INFO] [stdout] 1016 - match db.load_open_positions(at_cfg.mode) { [INFO] [stdout] 1017 - Ok(r) => r, [INFO] [stdout] 1018 - Err(_) => vec![], [INFO] [stdout] 1019 - }; [INFO] [stdout] 1016 + db.load_open_positions(at_cfg.mode).unwrap_or_default(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1015:23 [INFO] [stdout] | [INFO] [stdout] 1015 | let rows: Vec<(i64, i64, String, String, String, String, f64, f64, f64, f64, f64, String)> = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1016:17 [INFO] [stdout] | [INFO] [stdout] 1016 | / match db.load_open_positions(at_cfg.mode) { [INFO] [stdout] 1017 | | Ok(r) => r, [INFO] [stdout] 1018 | | Err(_) => vec![], [INFO] [stdout] 1019 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] help: ascribe the type std::vec::Vec<(i64, i64, std::string::String, std::string::String, std::string::String, std::string::String, f64, f64, f64, f64, f64, std::string::String)> and replace your expression with [INFO] [stdout] | [INFO] [stdout] 1016 - match db.load_open_positions(at_cfg.mode) { [INFO] [stdout] 1017 - Ok(r) => r, [INFO] [stdout] 1018 - Err(_) => vec![], [INFO] [stdout] 1019 - }; [INFO] [stdout] 1016 + db.load_open_positions(at_cfg.mode).unwrap_or_default(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1332:48 [INFO] [stdout] | [INFO] [stdout] 1332 | ... lines.push(format!( [INFO] [stdout] | __________________________________^ [INFO] [stdout] 1333 | | ... "Strateji ({}): {} {} @ {:.2} SL {:.2}", [INFO] [stdout] 1334 | | ... format!("{:?}", best_scn.role), [INFO] [stdout] 1335 | | ... dir, [INFO] [stdout] ... | [INFO] [stdout] 1338 | | ... best.stop_loss [INFO] [stdout] 1339 | | ... )); [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1332:48 [INFO] [stdout] | [INFO] [stdout] 1332 | ... lines.push(format!( [INFO] [stdout] | __________________________________^ [INFO] [stdout] 1333 | | ... "Strateji ({}): {} {} @ {:.2} SL {:.2}", [INFO] [stdout] 1334 | | ... format!("{:?}", best_scn.role), [INFO] [stdout] 1335 | | ... dir, [INFO] [stdout] ... | [INFO] [stdout] 1338 | | ... best.stop_loss [INFO] [stdout] 1339 | | ... )); [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1489:1 [INFO] [stdout] | [INFO] [stdout] 1489 | / async fn run_backtest_cmd( [INFO] [stdout] 1490 | | symbol: &str, [INFO] [stdout] 1491 | | market: &str, [INFO] [stdout] 1492 | | timeframe: &str, [INFO] [stdout] ... | [INFO] [stdout] 1499 | | q_score_min: f64, [INFO] [stdout] 1500 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1516:45 [INFO] [stdout] | [INFO] [stdout] 1516 | .fetch_klines_range(symbol, &binance_interval, start_ms, end_ms) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `binance_interval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1521:45 [INFO] [stdout] | [INFO] [stdout] 1521 | .fetch_klines_range(symbol, &binance_interval, start_ms, end_ms) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `binance_interval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1489:1 [INFO] [stdout] | [INFO] [stdout] 1489 | / async fn run_backtest_cmd( [INFO] [stdout] 1490 | | symbol: &str, [INFO] [stdout] 1491 | | market: &str, [INFO] [stdout] 1492 | | timeframe: &str, [INFO] [stdout] ... | [INFO] [stdout] 1499 | | q_score_min: f64, [INFO] [stdout] 1500 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1516:45 [INFO] [stdout] | [INFO] [stdout] 1516 | .fetch_klines_range(symbol, &binance_interval, start_ms, end_ms) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `binance_interval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/iqai-cli/src/main.rs:1521:45 [INFO] [stdout] | [INFO] [stdout] 1521 | .fetch_klines_range(symbol, &binance_interval, start_ms, end_ms) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `binance_interval` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 37s [INFO] running `Command { std: "docker" "inspect" "3cd5100fa54edc6135391a8f54716a1a81611d4fcf011dea65d566cc37c3c2ce", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3cd5100fa54edc6135391a8f54716a1a81611d4fcf011dea65d566cc37c3c2ce", kill_on_drop: false }` [INFO] [stdout] 3cd5100fa54edc6135391a8f54716a1a81611d4fcf011dea65d566cc37c3c2ce