[INFO] cloning repository https://github.com/a-korkin/money_maker [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/a-korkin/money_maker" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fa-korkin%2Fmoney_maker", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fa-korkin%2Fmoney_maker'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7e85f329cd8bdfd3e3923d486f0af7056777fe06 [INFO] linting a-korkin/money_maker against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fa-korkin%2Fmoney_maker" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/a-korkin/money_maker [INFO] finished tweaking git repo https://github.com/a-korkin/money_maker [INFO] tweaked toml for git repo https://github.com/a-korkin/money_maker written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/a-korkin/money_maker 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/a-korkin/money_maker already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded plotters-bitmap v0.3.7 [INFO] [stderr] Downloaded windows-registry v0.5.2 [INFO] [stderr] Downloaded pathfinder_geometry v0.5.1 [INFO] [stderr] Downloaded float-ord v0.3.2 [INFO] [stderr] Downloaded dwrote v0.11.3 [INFO] [stderr] Downloaded pathfinder_simd v0.5.5 [INFO] [stderr] Downloaded hyper-rustls v0.27.6 [INFO] [stderr] Downloaded clap v4.5.39 [INFO] [stderr] Downloaded prettyplease v0.2.33 [INFO] [stderr] Downloaded raylib v5.5.1 [INFO] [stderr] Downloaded font-kit v0.14.3 [INFO] [stderr] Downloaded reqwest v0.12.19 [INFO] [stderr] Downloaded clap_builder v4.5.39 [INFO] [stderr] Downloaded gif v0.12.0 [INFO] [stderr] Downloaded raylib-sys v5.5.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] aaae83f4ae3aaa5adb13201945aa3da17e7f50cae3061bfffee57701604b66c3 [INFO] running `Command { std: "docker" "start" "-a" "aaae83f4ae3aaa5adb13201945aa3da17e7f50cae3061bfffee57701604b66c3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "aaae83f4ae3aaa5adb13201945aa3da17e7f50cae3061bfffee57701604b66c3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aaae83f4ae3aaa5adb13201945aa3da17e7f50cae3061bfffee57701604b66c3", kill_on_drop: false }` [INFO] [stdout] aaae83f4ae3aaa5adb13201945aa3da17e7f50cae3061bfffee57701604b66c3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 09352cd4d0d59bf0b1977d5d2ed469f21e3a22c95561cf972ce1bae27fc9f3a3 [INFO] running `Command { std: "docker" "start" "-a" "09352cd4d0d59bf0b1977d5d2ed469f21e3a22c95561cf972ce1bae27fc9f3a3", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling cc v1.2.25 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Compiling stable_deref_trait v1.2.0 [INFO] [stderr] Checking hashbrown v0.15.3 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling libm v0.2.15 [INFO] [stderr] Compiling writeable v0.6.1 [INFO] [stderr] Compiling litemap v0.8.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Compiling log v0.4.27 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Compiling bigdecimal v0.4.8 [INFO] [stderr] Compiling pin-project-lite v0.2.16 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Compiling icu_properties_data v2.0.1 [INFO] [stderr] Compiling icu_normalizer_data v2.0.0 [INFO] [stderr] Compiling bitflags v2.9.1 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Compiling num-integer v0.1.46 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Compiling getrandom v0.2.16 [INFO] [stderr] Compiling zerocopy v0.8.25 [INFO] [stderr] Compiling bytes v1.10.1 [INFO] [stderr] Checking iana-time-zone v0.1.63 [INFO] [stderr] Checking simd-adler32 v0.3.7 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Compiling tinyvec v1.9.0 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Compiling form_urlencoded v1.2.1 [INFO] [stderr] Compiling concurrent-queue v2.5.0 [INFO] [stderr] Compiling tokio v1.48.0 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling num-bigint v0.4.6 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Checking adler2 v2.0.0 [INFO] [stderr] Compiling chrono v0.4.41 [INFO] [stderr] Checking miniz_oxide v0.8.8 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling ppv-lite86 v0.2.21 [INFO] [stderr] Compiling unicode-normalization v0.1.24 [INFO] [stderr] Compiling event-listener v5.4.0 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling crc v3.3.0 [INFO] [stderr] Compiling pathfinder_simd v0.5.5 [INFO] [stderr] Compiling hashlink v0.10.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling crossbeam-queue v0.3.12 [INFO] [stderr] Compiling freetype-sys v0.20.1 [INFO] [stderr] Compiling hmac v0.12.1 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking crc32fast v1.4.2 [INFO] [stderr] Compiling glob v0.3.2 [INFO] [stderr] Compiling uuid v1.17.0 [INFO] [stderr] Compiling stringprep v0.1.5 [INFO] [stderr] Checking flate2 v1.1.1 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Compiling hkdf v0.12.4 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Checking fdeflate v0.3.7 [INFO] [stderr] Compiling atoi v2.0.0 [INFO] [stderr] Compiling md-5 v0.10.6 [INFO] [stderr] Checking libloading v0.8.8 [INFO] [stderr] Compiling whoami v1.6.0 [INFO] [stderr] Compiling home v0.5.11 [INFO] [stderr] Compiling prettyplease v0.2.33 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling tracing-attributes v0.1.28 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling tokio-stream v0.1.17 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.2 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Checking weezl v0.1.10 [INFO] [stderr] Checking anstyle-query v1.1.3 [INFO] [stderr] Checking plotters-backend v0.3.7 [INFO] [stderr] Checking jpeg-decoder v0.3.1 [INFO] [stderr] Compiling regex-syntax v0.8.5 [INFO] [stderr] Checking bytemuck v1.23.0 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Compiling font-kit v0.14.3 [INFO] [stderr] Checking anstyle v1.0.11 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking anstream v0.6.19 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking gif v0.12.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling regex-automata v0.4.9 [INFO] [stderr] Checking pathfinder_geometry v0.5.1 [INFO] [stderr] Checking yeslogic-fontconfig-sys v6.0.0 [INFO] [stderr] Checking dirs v6.0.0 [INFO] [stderr] Checking float-ord v0.3.2 [INFO] [stderr] Checking clap_lex v0.7.4 [INFO] [stderr] Compiling bindgen v0.70.1 [INFO] [stderr] Checking clap_builder v4.5.39 [INFO] [stderr] Compiling anyhow v1.0.98 [INFO] [stderr] Checking plotters-bitmap v0.3.7 [INFO] [stderr] Compiling cexpr v0.6.0 [INFO] [stderr] Checking plotters-svg v0.3.7 [INFO] [stderr] Compiling clap_derive v4.5.32 [INFO] [stderr] Checking smallvec v1.15.0 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Compiling futures-intrusive v0.5.0 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Compiling itertools v0.13.0 [INFO] [stderr] Compiling regex v1.11.1 [INFO] [stderr] Checking csv-core v0.1.12 [INFO] [stderr] Checking ttf-parser v0.20.0 [INFO] [stderr] Checking csv v1.3.1 [INFO] [stderr] Checking clap v4.5.39 [INFO] [stderr] Compiling sqlx-core v0.8.6 [INFO] [stderr] Compiling cmake v0.1.54 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling seq-macro v0.3.6 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tower-http v0.6.6 [INFO] [stderr] Checking h2 v0.4.10 [INFO] [stderr] Compiling sqlx-postgres v0.8.6 [INFO] [stderr] Compiling raylib-sys v5.5.1 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Compiling sqlx-macros-core v0.8.6 [INFO] [stderr] Checking hyper-util v0.1.14 [INFO] [stderr] Compiling sqlx-macros v0.8.6 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.19 [INFO] [stderr] Checking sqlx v0.8.6 [INFO] [stderr] Checking app v0.1.0 (/opt/rustwide/workdir/app) [INFO] [stderr] Checking cron v0.1.0 (/opt/rustwide/workdir/cron) [INFO] [stdout] warning: unused import: `TradeInfo` [INFO] [stdout] --> app/src/db/pg.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | TradeInfo, TradeView, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `NaiveDate` [INFO] [stdout] --> app/src/lib.rs:8:24 [INFO] [stdout] | [INFO] [stdout] 8 | use chrono::{Duration, NaiveDate}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> app/src/lib.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | use csv; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `get_candles` [INFO] [stdout] --> app/src/lib.rs:12:66 [INFO] [stdout] | [INFO] [stdout] 12 | add_candles, add_securities, add_trades, get_all_securities, get_candles, init_db, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> app/src/lib.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | use dotenv; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Frame`, `TradeInfo`, and `TradeType` [INFO] [stdout] --> app/src/lib.rs:17:30 [INFO] [stdout] | [INFO] [stdout] 17 | use models::common::{Candle, Frame, Trade, TradeInfo, TradeType}; [INFO] [stdout] | ^^^^^ ^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::FromStr` [INFO] [stdout] --> app/src/lib.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use std::str::FromStr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration as time_duration` [INFO] [stdout] --> app/src/lib.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | use std::time::Duration as time_duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `best_choice`, `pretty_print_info`, and `trade_info` [INFO] [stdout] --> app/src/lib.rs:24:26 [INFO] [stdout] | [INFO] [stdout] 24 | use strategy::strategy::{best_choice, pretty_print_candle, pretty_print_info, trade_info}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> cron/src/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use reqwest; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> cron/src/main.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | use tokio; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> cron/src/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use reqwest; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> cron/src/main.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | use tokio; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> cron/src/main.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | run(&security, &DownloadType::Trades).await; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `security` [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] --> cron/src/main.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | run(&security, &DownloadType::Candles).await; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `security` [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: direct implementation of `ToString` [INFO] [stdout] --> cron/src/main.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / impl ToString for DownloadType { [INFO] [stdout] 32 | | fn to_string(&self) -> String { [INFO] [stdout] 33 | | match self { [INFO] [stdout] 34 | | Self::Trades => String::from("trades"), [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> cron/src/main.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | return rows; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 146 - return rows; [INFO] [stdout] 146 + rows [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TradeInfo` [INFO] [stdout] --> app/src/db/pg.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | TradeInfo, TradeView, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> cron/src/main.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | run(&security, &DownloadType::Trades).await; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `security` [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] --> cron/src/main.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | run(&security, &DownloadType::Candles).await; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `security` [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: direct implementation of `ToString` [INFO] [stdout] --> cron/src/main.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / impl ToString for DownloadType { [INFO] [stdout] 32 | | fn to_string(&self) -> String { [INFO] [stdout] 33 | | match self { [INFO] [stdout] 34 | | Self::Trades => String::from("trades"), [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> cron/src/main.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | return rows; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 146 - return rows; [INFO] [stdout] 146 + rows [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `NaiveDate` [INFO] [stdout] --> app/src/lib.rs:8:24 [INFO] [stdout] | [INFO] [stdout] 8 | use chrono::{Duration, NaiveDate}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> app/src/lib.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | use csv; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `get_candles` [INFO] [stdout] --> app/src/lib.rs:12:66 [INFO] [stdout] | [INFO] [stdout] 12 | add_candles, add_securities, add_trades, get_all_securities, get_candles, init_db, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> app/src/lib.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | use dotenv; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Frame`, `TradeInfo`, and `TradeType` [INFO] [stdout] --> app/src/lib.rs:17:30 [INFO] [stdout] | [INFO] [stdout] 17 | use models::common::{Candle, Frame, Trade, TradeInfo, TradeType}; [INFO] [stdout] | ^^^^^ ^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::FromStr` [INFO] [stdout] --> app/src/lib.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use std::str::FromStr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration as time_duration` [INFO] [stdout] --> app/src/lib.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | use std::time::Duration as time_duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `best_choice`, `pretty_print_info`, and `trade_info` [INFO] [stdout] --> app/src/lib.rs:24:26 [INFO] [stdout] | [INFO] [stdout] 24 | use strategy::strategy::{best_choice, pretty_print_candle, pretty_print_info, trade_info}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> app/src/strategy/strategy.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | let mut current_inner = 0; [INFO] [stdout] | ----^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> app/src/strategy/strategy.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | let mut current_inner = 0; [INFO] [stdout] | ----^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> app/src/strategy/strategy.rs:120:14 [INFO] [stdout] | [INFO] [stdout] 120 | for (j, y) in hour_candles { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `volume_up` is assigned to, but never used [INFO] [stdout] --> app/src/strategy/strategy.rs:324:9 [INFO] [stdout] | [INFO] [stdout] 324 | let mut volume_up: f32 = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_volume_up` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `volume_down` is assigned to, but never used [INFO] [stdout] --> app/src/strategy/strategy.rs:325:9 [INFO] [stdout] | [INFO] [stdout] 325 | let mut volume_down: f32 = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_volume_down` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `volume_up` is never read [INFO] [stdout] --> app/src/strategy/strategy.rs:346:13 [INFO] [stdout] | [INFO] [stdout] 346 | volume_up = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `volume_up` is never read [INFO] [stdout] --> app/src/strategy/strategy.rs:354:13 [INFO] [stdout] | [INFO] [stdout] 354 | volume_up += candle.volume; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `volume_down` is never read [INFO] [stdout] --> app/src/strategy/strategy.rs:347:13 [INFO] [stdout] | [INFO] [stdout] 347 | volume_down = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `volume_down` is never read [INFO] [stdout] --> app/src/strategy/strategy.rs:361:13 [INFO] [stdout] | [INFO] [stdout] 361 | volume_down += candle.volume; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `display` is never used [INFO] [stdout] --> app/src/lib.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn display(candles: &Vec) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pretty_print_info` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn pretty_print_info(info: &TradeInfo) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pretty_print_candle` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn pretty_print_candle(candle: &Candle) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TradesResult` is never constructed [INFO] [stdout] --> app/src/strategy/strategy.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | pub struct TradesResult { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `best_choice` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:60:14 [INFO] [stdout] | [INFO] [stdout] 60 | pub async fn best_choice(pool: &PgPool, security: &str, date: &NaiveDate) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_quantities` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:171:4 [INFO] [stdout] | [INFO] [stdout] 171 | fn get_quantities(scope_trades: &Vec<&TradeInfo>, datetime: &NaiveDateTime) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_sum_quantity_scope` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:199:4 [INFO] [stdout] | [INFO] [stdout] 199 | fn get_sum_quantity_scope( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_header` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:245:4 [INFO] [stdout] | [INFO] [stdout] 245 | fn print_header() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_trades_result` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:265:4 [INFO] [stdout] | [INFO] [stdout] 265 | fn print_trades_result(trades: &Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> app/src/db/pg.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 12 | / let pool = PgPool::connect(&db_url) [INFO] [stdout] 13 | | .await [INFO] [stdout] 14 | | .expect("failed to connect to postgres"); [INFO] [stdout] | |_________________________________________________- unnecessary `let` binding [INFO] [stdout] 15 | pool [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 12 ~ [INFO] [stdout] 13 ~ PgPool::connect(&db_url) [INFO] [stdout] 14 + .await [INFO] [stdout] 15 + .expect("failed to connect to postgres") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> app/src/db/pg.rs:37:66 [INFO] [stdout] | [INFO] [stdout] 37 | pub async fn add_candles(pool: &PgPool, security: &str, candles: &Vec) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 37 - pub async fn add_candles(pool: &PgPool, security: &str, candles: &Vec) -> u64 { [INFO] [stdout] 37 + pub async fn add_candles(pool: &PgPool, security: &str, candles: &[Candle]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> app/src/db/pg.rs:86:25 [INFO] [stdout] | [INFO] [stdout] 86 | let _ = sqlx::query(&sql) [INFO] [stdout] | ^^^^ help: change this to: `sql` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> app/src/db/pg.rs:92:64 [INFO] [stdout] | [INFO] [stdout] 92 | pub async fn add_trades(pool: &PgPool, security: &str, trades: &Vec) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 92 - pub async fn add_trades(pool: &PgPool, security: &str, trades: &Vec) -> u64 { [INFO] [stdout] 92 + pub async fn add_trades(pool: &PgPool, security: &str, trades: &[Trade]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> app/src/db/pg.rs:142:25 [INFO] [stdout] | [INFO] [stdout] 142 | let _ = sqlx::query(&sql) [INFO] [stdout] | ^^^^ help: change this to: `sql` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/db/pg.rs:237:5 [INFO] [stdout] | [INFO] [stdout] 237 | / return result [INFO] [stdout] 238 | | .iter() [INFO] [stdout] 239 | | .map(|a| a.0.to_owned()) [INFO] [stdout] 240 | | .collect::>(); [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 237 ~ result [INFO] [stdout] 238 + .iter() [INFO] [stdout] 239 + .map(|a| a.0.to_owned()) [INFO] [stdout] 240 ~ .collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/db/pg.rs:440:5 [INFO] [stdout] | [INFO] [stdout] 440 | return result.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 440 - return result.0; [INFO] [stdout] 440 + result.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> app/src/db/pg.rs:467:44 [INFO] [stdout] | [INFO] [stdout] 467 | let result: StartInfo = sqlx::query_as(&sql) [INFO] [stdout] | ^^^^ help: change this to: `sql` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/db/repo.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 30 - return result; [INFO] [stdout] 30 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> app/src/models/common.rs:25:1 [INFO] [stdout] | [INFO] [stdout] 25 | impl Into for SecuritiesStr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 25 ~ impl From for String { [INFO] [stdout] 26 ~ fn from(val: SecuritiesStr) -> Self { [INFO] [stdout] 27 ~ val.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> app/src/models/common.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | / impl ToString for Frame { [INFO] [stdout] 52 | | fn to_string(&self) -> String { [INFO] [stdout] 53 | | match self { [INFO] [stdout] 54 | | Frame::M1 => String::from("m1"), [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> app/src/models/common.rs:224:1 [INFO] [stdout] | [INFO] [stdout] 224 | / impl ToString for OperationType { [INFO] [stdout] 225 | | fn to_string(&self) -> String { [INFO] [stdout] 226 | | match self { [INFO] [stdout] 227 | | OperationType::Buy => String::from("buy"), [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> app/src/strategy/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod strategy; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> app/src/strategy/strategy.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 42 | let info = repo::get_trade_info(pool, security, date).await; [INFO] [stdout] | ------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 43 | info [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 42 ~ [INFO] [stdout] 43 ~ repo::get_trade_info(pool, security, date).await [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> app/src/strategy/strategy.rs:63:43 [INFO] [stdout] | [INFO] [stdout] 63 | let end = begin + Duration::from_secs(60 * 60 * 24 * 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `(60 * 60 * 24)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> app/src/strategy/strategy.rs:67:21 [INFO] [stdout] | [INFO] [stdout] 67 | .enumerate() [INFO] [stdout] | _____________________^ [INFO] [stdout] 68 | | .map(|(a, b)| (a, b)) [INFO] [stdout] | |_____________________________^ help: remove the call to `map` [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: length comparison to zero [INFO] [stdout] --> app/src/strategy/strategy.rs:178:8 [INFO] [stdout] | [INFO] [stdout] 178 | if trades.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!trades.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> app/src/strategy/strategy.rs:252:9 [INFO] [stdout] | [INFO] [stdout] 252 | "percent", [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 249 ~ "{:>8} | {:>8} | percent | {:>10} | {:>10} | {:>8} | {:>8} | {:>13} | {:>13} | {:>13} | {:>13}", [INFO] [stdout] 250 | "start", [INFO] [stdout] 251 ~ "end", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> app/src/strategy/strategy.rs:374:13 [INFO] [stdout] | [INFO] [stdout] 374 | -1f32 * percent [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using: `-percent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> app/src/strategy/strategy.rs:391:16 [INFO] [stdout] | [INFO] [stdout] 391 | && percent >= 0.0 [INFO] [stdout] | ________________^ [INFO] [stdout] 392 | | && percent <= 0.001 [INFO] [stdout] | |_______________________________^ help: use: `(0.0..=0.001).contains(&percent)` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> app/src/strategy/strategy.rs:462:42 [INFO] [stdout] | [INFO] [stdout] 462 | strategy_logic(pool, packet, &candle, &attempt, last_operation, sold, buy).await; [INFO] [stdout] | ^^^^^^^ help: change this to: `candle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/strategy/strategy.rs:513:5 [INFO] [stdout] | [INFO] [stdout] 513 | return prev; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 513 - return prev; [INFO] [stdout] 513 + prev [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/strategy/strategy.rs:546:5 [INFO] [stdout] | [INFO] [stdout] 546 | return operation.id; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 546 - return operation.id; [INFO] [stdout] 546 + operation.id [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> app/src/strategy/strategy.rs:531:5 [INFO] [stdout] | [INFO] [stdout] 531 | sum_after = sum_after - *commission; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sum_after -= *commission` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/lib.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | return securities; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 105 - return securities; [INFO] [stdout] 105 + securities [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> app/src/lib.rs:89:37 [INFO] [stdout] | [INFO] [stdout] 89 | "all" => get_all_securities(&pool).await, [INFO] [stdout] | ^^^^^ help: change this to: `pool` [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: direct implementation of `ToString` [INFO] [stdout] --> app/src/lib.rs:119:1 [INFO] [stdout] | [INFO] [stdout] 119 | / impl ToString for Kind { [INFO] [stdout] 120 | | fn to_string(&self) -> String { [INFO] [stdout] 121 | | match self { [INFO] [stdout] 122 | | Self::Candles => String::from("candles"), [INFO] [stdout] ... | [INFO] [stdout] 126 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> app/src/lib.rs:186:31 [INFO] [stdout] | [INFO] [stdout] 186 | if !fs::exists(&path).expect(&format!("directory not exists: {}", &path)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("directory not exists: {}", &path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> app/src/strategy/strategy.rs:120:14 [INFO] [stdout] | [INFO] [stdout] 120 | for (j, y) in hour_candles { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `volume_up` is assigned to, but never used [INFO] [stdout] --> app/src/strategy/strategy.rs:324:9 [INFO] [stdout] | [INFO] [stdout] 324 | let mut volume_up: f32 = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_volume_up` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `volume_down` is assigned to, but never used [INFO] [stdout] --> app/src/strategy/strategy.rs:325:9 [INFO] [stdout] | [INFO] [stdout] 325 | let mut volume_down: f32 = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_volume_down` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `volume_up` is never read [INFO] [stdout] --> app/src/strategy/strategy.rs:346:13 [INFO] [stdout] | [INFO] [stdout] 346 | volume_up = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `volume_up` is never read [INFO] [stdout] --> app/src/strategy/strategy.rs:354:13 [INFO] [stdout] | [INFO] [stdout] 354 | volume_up += candle.volume; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `volume_down` is never read [INFO] [stdout] --> app/src/strategy/strategy.rs:347:13 [INFO] [stdout] | [INFO] [stdout] 347 | volume_down = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `volume_down` is never read [INFO] [stdout] --> app/src/strategy/strategy.rs:361:13 [INFO] [stdout] | [INFO] [stdout] 361 | volume_down += candle.volume; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `display` is never used [INFO] [stdout] --> app/src/lib.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn display(candles: &Vec) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pretty_print_info` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn pretty_print_info(info: &TradeInfo) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pretty_print_candle` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn pretty_print_candle(candle: &Candle) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TradesResult` is never constructed [INFO] [stdout] --> app/src/strategy/strategy.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | pub struct TradesResult { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `best_choice` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:60:14 [INFO] [stdout] | [INFO] [stdout] 60 | pub async fn best_choice(pool: &PgPool, security: &str, date: &NaiveDate) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_quantities` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:171:4 [INFO] [stdout] | [INFO] [stdout] 171 | fn get_quantities(scope_trades: &Vec<&TradeInfo>, datetime: &NaiveDateTime) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_sum_quantity_scope` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:199:4 [INFO] [stdout] | [INFO] [stdout] 199 | fn get_sum_quantity_scope( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_header` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:245:4 [INFO] [stdout] | [INFO] [stdout] 245 | fn print_header() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_trades_result` is never used [INFO] [stdout] --> app/src/strategy/strategy.rs:265:4 [INFO] [stdout] | [INFO] [stdout] 265 | fn print_trades_result(trades: &Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> app/src/db/pg.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 12 | / let pool = PgPool::connect(&db_url) [INFO] [stdout] 13 | | .await [INFO] [stdout] 14 | | .expect("failed to connect to postgres"); [INFO] [stdout] | |_________________________________________________- unnecessary `let` binding [INFO] [stdout] 15 | pool [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 12 ~ [INFO] [stdout] 13 ~ PgPool::connect(&db_url) [INFO] [stdout] 14 + .await [INFO] [stdout] 15 + .expect("failed to connect to postgres") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> app/src/db/pg.rs:37:66 [INFO] [stdout] | [INFO] [stdout] 37 | pub async fn add_candles(pool: &PgPool, security: &str, candles: &Vec) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 37 - pub async fn add_candles(pool: &PgPool, security: &str, candles: &Vec) -> u64 { [INFO] [stdout] 37 + pub async fn add_candles(pool: &PgPool, security: &str, candles: &[Candle]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> app/src/db/pg.rs:86:25 [INFO] [stdout] | [INFO] [stdout] 86 | let _ = sqlx::query(&sql) [INFO] [stdout] | ^^^^ help: change this to: `sql` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> app/src/db/pg.rs:92:64 [INFO] [stdout] | [INFO] [stdout] 92 | pub async fn add_trades(pool: &PgPool, security: &str, trades: &Vec) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 92 - pub async fn add_trades(pool: &PgPool, security: &str, trades: &Vec) -> u64 { [INFO] [stdout] 92 + pub async fn add_trades(pool: &PgPool, security: &str, trades: &[Trade]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> app/src/db/pg.rs:142:25 [INFO] [stdout] | [INFO] [stdout] 142 | let _ = sqlx::query(&sql) [INFO] [stdout] | ^^^^ help: change this to: `sql` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/db/pg.rs:237:5 [INFO] [stdout] | [INFO] [stdout] 237 | / return result [INFO] [stdout] 238 | | .iter() [INFO] [stdout] 239 | | .map(|a| a.0.to_owned()) [INFO] [stdout] 240 | | .collect::>(); [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 237 ~ result [INFO] [stdout] 238 + .iter() [INFO] [stdout] 239 + .map(|a| a.0.to_owned()) [INFO] [stdout] 240 ~ .collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/db/pg.rs:440:5 [INFO] [stdout] | [INFO] [stdout] 440 | return result.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 440 - return result.0; [INFO] [stdout] 440 + result.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> app/src/db/pg.rs:467:44 [INFO] [stdout] | [INFO] [stdout] 467 | let result: StartInfo = sqlx::query_as(&sql) [INFO] [stdout] | ^^^^ help: change this to: `sql` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/db/repo.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 30 - return result; [INFO] [stdout] 30 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> app/src/models/common.rs:25:1 [INFO] [stdout] | [INFO] [stdout] 25 | impl Into for SecuritiesStr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 25 ~ impl From for String { [INFO] [stdout] 26 ~ fn from(val: SecuritiesStr) -> Self { [INFO] [stdout] 27 ~ val.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> app/src/models/common.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | / impl ToString for Frame { [INFO] [stdout] 52 | | fn to_string(&self) -> String { [INFO] [stdout] 53 | | match self { [INFO] [stdout] 54 | | Frame::M1 => String::from("m1"), [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> app/src/models/common.rs:224:1 [INFO] [stdout] | [INFO] [stdout] 224 | / impl ToString for OperationType { [INFO] [stdout] 225 | | fn to_string(&self) -> String { [INFO] [stdout] 226 | | match self { [INFO] [stdout] 227 | | OperationType::Buy => String::from("buy"), [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> app/src/strategy/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod strategy; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> app/src/strategy/strategy.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 42 | let info = repo::get_trade_info(pool, security, date).await; [INFO] [stdout] | ------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 43 | info [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 42 ~ [INFO] [stdout] 43 ~ repo::get_trade_info(pool, security, date).await [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> app/src/strategy/strategy.rs:63:43 [INFO] [stdout] | [INFO] [stdout] 63 | let end = begin + Duration::from_secs(60 * 60 * 24 * 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `(60 * 60 * 24)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> app/src/strategy/strategy.rs:67:21 [INFO] [stdout] | [INFO] [stdout] 67 | .enumerate() [INFO] [stdout] | _____________________^ [INFO] [stdout] 68 | | .map(|(a, b)| (a, b)) [INFO] [stdout] | |_____________________________^ help: remove the call to `map` [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: length comparison to zero [INFO] [stdout] --> app/src/strategy/strategy.rs:178:8 [INFO] [stdout] | [INFO] [stdout] 178 | if trades.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!trades.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> app/src/strategy/strategy.rs:252:9 [INFO] [stdout] | [INFO] [stdout] 252 | "percent", [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 249 ~ "{:>8} | {:>8} | percent | {:>10} | {:>10} | {:>8} | {:>8} | {:>13} | {:>13} | {:>13} | {:>13}", [INFO] [stdout] 250 | "start", [INFO] [stdout] 251 ~ "end", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> app/src/strategy/strategy.rs:374:13 [INFO] [stdout] | [INFO] [stdout] 374 | -1f32 * percent [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using: `-percent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> app/src/strategy/strategy.rs:391:16 [INFO] [stdout] | [INFO] [stdout] 391 | && percent >= 0.0 [INFO] [stdout] | ________________^ [INFO] [stdout] 392 | | && percent <= 0.001 [INFO] [stdout] | |_______________________________^ help: use: `(0.0..=0.001).contains(&percent)` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> app/src/strategy/strategy.rs:462:42 [INFO] [stdout] | [INFO] [stdout] 462 | strategy_logic(pool, packet, &candle, &attempt, last_operation, sold, buy).await; [INFO] [stdout] | ^^^^^^^ help: change this to: `candle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/strategy/strategy.rs:513:5 [INFO] [stdout] | [INFO] [stdout] 513 | return prev; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 513 - return prev; [INFO] [stdout] 513 + prev [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/strategy/strategy.rs:546:5 [INFO] [stdout] | [INFO] [stdout] 546 | return operation.id; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 546 - return operation.id; [INFO] [stdout] 546 + operation.id [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> app/src/strategy/strategy.rs:531:5 [INFO] [stdout] | [INFO] [stdout] 531 | sum_after = sum_after - *commission; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sum_after -= *commission` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> app/src/lib.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | return securities; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 105 - return securities; [INFO] [stdout] 105 + securities [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> app/src/lib.rs:89:37 [INFO] [stdout] | [INFO] [stdout] 89 | "all" => get_all_securities(&pool).await, [INFO] [stdout] | ^^^^^ help: change this to: `pool` [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: direct implementation of `ToString` [INFO] [stdout] --> app/src/lib.rs:119:1 [INFO] [stdout] | [INFO] [stdout] 119 | / impl ToString for Kind { [INFO] [stdout] 120 | | fn to_string(&self) -> String { [INFO] [stdout] 121 | | match self { [INFO] [stdout] 122 | | Self::Candles => String::from("candles"), [INFO] [stdout] ... | [INFO] [stdout] 126 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> app/src/lib.rs:186:31 [INFO] [stdout] | [INFO] [stdout] 186 | if !fs::exists(&path).expect(&format!("directory not exists: {}", &path)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("directory not exists: {}", &path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> app/src/main.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use tokio; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> app/src/main.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use tokio; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking raylib v5.5.1 [INFO] [stderr] Checking terminal v0.1.0 (/opt/rustwide/workdir/terminal) [INFO] [stdout] warning: unused import: `NaiveDate` [INFO] [stdout] --> terminal/src/lib.rs:3:24 [INFO] [stdout] | [INFO] [stdout] 3 | use chrono::{Datelike, NaiveDate, NaiveDateTime, Timelike}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> terminal/src/lib.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let mut dates = &start_info.dates.split(";").collect::>(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> terminal/src/lib.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | let mut trades = pg::get_trades_view( [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `NaiveDate` [INFO] [stdout] --> terminal/src/lib.rs:3:24 [INFO] [stdout] | [INFO] [stdout] 3 | use chrono::{Datelike, NaiveDate, NaiveDateTime, Timelike}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scrolled` [INFO] [stdout] --> terminal/src/lib.rs:705:5 [INFO] [stdout] | [INFO] [stdout] 705 | scrolled: bool, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_scrolled` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DATE_FMT` is never used [INFO] [stdout] --> terminal/src/lib.rs:17:7 [INFO] [stdout] | [INFO] [stdout] 17 | const DATE_FMT: &str = "%Y-%m-%d"; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `draw_datepicker` is never used [INFO] [stdout] --> terminal/src/lib.rs:658:4 [INFO] [stdout] | [INFO] [stdout] 658 | fn draw_datepicker( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `draw_arrow` is never used [INFO] [stdout] --> terminal/src/lib.rs:849:4 [INFO] [stdout] | [INFO] [stdout] 849 | fn draw_arrow(d: &mut RaylibDrawHandle, current_candle: &mut Candle) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> terminal/src/lib.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::i64; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> terminal/src/lib.rs:75:8 [INFO] [stdout] | [INFO] [stdout] 75 | if !data.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `data.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> terminal/src/lib.rs:64:47 [INFO] [stdout] | [INFO] [stdout] 64 | let mut end = begin + Duration::from_secs(60 * 60 * 24 * 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `(60 * 60 * 24)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> terminal/src/lib.rs:244:51 [INFO] [stdout] | [INFO] [stdout] 244 | end = begin + Duration::from_secs(60 * 60 * 24 * 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `(60 * 60 * 24)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> terminal/src/lib.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 331 | return Some((candles, coords)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 331 - return Some((candles, coords)); [INFO] [stdout] 331 + Some((candles, coords)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> terminal/src/lib.rs:303:41 [INFO] [stdout] | [INFO] [stdout] 303 | let candles = pg::get_candles(pool, &security, begin, end, limit, frame).await; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `security` [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 `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Vec` [INFO] [stdout] --> terminal/src/lib.rs:422:32 [INFO] [stdout] | [INFO] [stdout] 422 | for (i, candle) in candles.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> terminal/src/lib.rs:488:8 [INFO] [stdout] | [INFO] [stdout] 488 | if minute % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `minute.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> terminal/src/lib.rs:527:20 [INFO] [stdout] | [INFO] [stdout] 527 | if day == 1 || day % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `day.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> terminal/src/lib.rs:565:8 [INFO] [stdout] | [INFO] [stdout] 565 | if hour % 3 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace with: `hour.is_multiple_of(3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> terminal/src/lib.rs:590:1 [INFO] [stdout] | [INFO] [stdout] 590 | / async fn draw_ui<'a>( [INFO] [stdout] 591 | | d: &mut RaylibDrawHandle<'a>, [INFO] [stdout] 592 | | ui: &mut UiElements<'a>, [INFO] [stdout] 593 | | pool: &'a PgPool, [INFO] [stdout] ... | [INFO] [stdout] 598 | | frame: &Frame, [INFO] [stdout] 599 | | ) { [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: returning the result of a `let` binding from a block [INFO] [stdout] --> terminal/src/lib.rs:714:5 [INFO] [stdout] | [INFO] [stdout] 713 | let result = d.gui_dropdown_box(position, list, active, *edit); [INFO] [stdout] | --------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 714 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 713 ~ [INFO] [stdout] 714 ~ d.gui_dropdown_box(position, list, active, *edit) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> terminal/src/lib.rs:816:30 [INFO] [stdout] | [INFO] [stdout] 816 | for (i, trade) in trades.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> terminal/src/lib.rs:850:5 [INFO] [stdout] | [INFO] [stdout] 850 | / if let Some(x) = current_candle.position_x { [INFO] [stdout] 851 | | if let Some(y) = current_candle.position_y { [INFO] [stdout] 852 | | let diff_x = 0.8; [INFO] [stdout] 853 | | let diff_y = 15.0; [INFO] [stdout] ... | [INFO] [stdout] 871 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 850 ~ if let Some(x) = current_candle.position_x [INFO] [stdout] 851 ~ && let Some(y) = current_candle.position_y { [INFO] [stdout] 852 | let diff_x = 0.8; [INFO] [stdout] ... [INFO] [stdout] 869 | d.draw_line_ex(start_pos, end_pos, thick, Color::WHEAT); [INFO] [stdout] 870 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `scrollPanelBounds` should have a snake case name [INFO] [stdout] --> terminal/src/lib.rs:229:17 [INFO] [stdout] | [INFO] [stdout] 229 | let scrollPanelBounds: Rectangle = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `scroll_panel_bounds` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> terminal/src/lib.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let mut dates = &start_info.dates.split(";").collect::>(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> terminal/src/lib.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | let mut trades = pg::get_trades_view( [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scrolled` [INFO] [stdout] --> terminal/src/lib.rs:705:5 [INFO] [stdout] | [INFO] [stdout] 705 | scrolled: bool, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_scrolled` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DATE_FMT` is never used [INFO] [stdout] --> terminal/src/lib.rs:17:7 [INFO] [stdout] | [INFO] [stdout] 17 | const DATE_FMT: &str = "%Y-%m-%d"; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `draw_datepicker` is never used [INFO] [stdout] --> terminal/src/lib.rs:658:4 [INFO] [stdout] | [INFO] [stdout] 658 | fn draw_datepicker( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `draw_arrow` is never used [INFO] [stdout] --> terminal/src/lib.rs:849:4 [INFO] [stdout] | [INFO] [stdout] 849 | fn draw_arrow(d: &mut RaylibDrawHandle, current_candle: &mut Candle) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> terminal/src/lib.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::i64; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> terminal/src/lib.rs:75:8 [INFO] [stdout] | [INFO] [stdout] 75 | if !data.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `data.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> terminal/src/lib.rs:64:47 [INFO] [stdout] | [INFO] [stdout] 64 | let mut end = begin + Duration::from_secs(60 * 60 * 24 * 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `(60 * 60 * 24)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> terminal/src/lib.rs:244:51 [INFO] [stdout] | [INFO] [stdout] 244 | end = begin + Duration::from_secs(60 * 60 * 24 * 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `(60 * 60 * 24)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> terminal/src/lib.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 331 | return Some((candles, coords)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 331 - return Some((candles, coords)); [INFO] [stdout] 331 + Some((candles, coords)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> terminal/src/lib.rs:303:41 [INFO] [stdout] | [INFO] [stdout] 303 | let candles = pg::get_candles(pool, &security, begin, end, limit, frame).await; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `security` [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 `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Vec` [INFO] [stdout] --> terminal/src/lib.rs:422:32 [INFO] [stdout] | [INFO] [stdout] 422 | for (i, candle) in candles.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> terminal/src/lib.rs:488:8 [INFO] [stdout] | [INFO] [stdout] 488 | if minute % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `minute.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> terminal/src/lib.rs:527:20 [INFO] [stdout] | [INFO] [stdout] 527 | if day == 1 || day % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `day.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> terminal/src/lib.rs:565:8 [INFO] [stdout] | [INFO] [stdout] 565 | if hour % 3 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace with: `hour.is_multiple_of(3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> terminal/src/lib.rs:590:1 [INFO] [stdout] | [INFO] [stdout] 590 | / async fn draw_ui<'a>( [INFO] [stdout] 591 | | d: &mut RaylibDrawHandle<'a>, [INFO] [stdout] 592 | | ui: &mut UiElements<'a>, [INFO] [stdout] 593 | | pool: &'a PgPool, [INFO] [stdout] ... | [INFO] [stdout] 598 | | frame: &Frame, [INFO] [stdout] 599 | | ) { [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: returning the result of a `let` binding from a block [INFO] [stdout] --> terminal/src/lib.rs:714:5 [INFO] [stdout] | [INFO] [stdout] 713 | let result = d.gui_dropdown_box(position, list, active, *edit); [INFO] [stdout] | --------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 714 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 713 ~ [INFO] [stdout] 714 ~ d.gui_dropdown_box(position, list, active, *edit) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> terminal/src/lib.rs:816:30 [INFO] [stdout] | [INFO] [stdout] 816 | for (i, trade) in trades.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> terminal/src/lib.rs:850:5 [INFO] [stdout] | [INFO] [stdout] 850 | / if let Some(x) = current_candle.position_x { [INFO] [stdout] 851 | | if let Some(y) = current_candle.position_y { [INFO] [stdout] 852 | | let diff_x = 0.8; [INFO] [stdout] 853 | | let diff_y = 15.0; [INFO] [stdout] ... | [INFO] [stdout] 871 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 850 ~ if let Some(x) = current_candle.position_x [INFO] [stdout] 851 ~ && let Some(y) = current_candle.position_y { [INFO] [stdout] 852 | let diff_x = 0.8; [INFO] [stdout] ... [INFO] [stdout] 869 | d.draw_line_ex(start_pos, end_pos, thick, Color::WHEAT); [INFO] [stdout] 870 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `scrollPanelBounds` should have a snake case name [INFO] [stdout] --> terminal/src/lib.rs:229:17 [INFO] [stdout] | [INFO] [stdout] 229 | let scrollPanelBounds: Rectangle = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `scroll_panel_bounds` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> terminal/src/main.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use tokio; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> terminal/src/main.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use tokio; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3m 13s [INFO] running `Command { std: "docker" "inspect" "09352cd4d0d59bf0b1977d5d2ed469f21e3a22c95561cf972ce1bae27fc9f3a3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "09352cd4d0d59bf0b1977d5d2ed469f21e3a22c95561cf972ce1bae27fc9f3a3", kill_on_drop: false }` [INFO] [stdout] 09352cd4d0d59bf0b1977d5d2ed469f21e3a22c95561cf972ce1bae27fc9f3a3