[INFO] cloning repository https://github.com/riiazz/habit-tracker [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/riiazz/habit-tracker" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Friiazz%2Fhabit-tracker", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Friiazz%2Fhabit-tracker'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7e135fb64b8425d24a80daa6a6679e877884aa66 [INFO] linting riiazz/habit-tracker against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Friiazz%2Fhabit-tracker" "/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/riiazz/habit-tracker [INFO] finished tweaking git repo https://github.com/riiazz/habit-tracker [INFO] tweaked toml for git repo https://github.com/riiazz/habit-tracker written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/riiazz/habit-tracker 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/riiazz/habit-tracker 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 find-msvc-tools v0.1.2 [INFO] [stderr] Downloaded ref-cast-impl v1.0.24 [INFO] [stderr] Downloaded serde_with_macros v3.14.1 [INFO] [stderr] Downloaded ref-cast v1.0.24 [INFO] [stderr] Downloaded wasm-bindgen-backend v0.2.103 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.103 [INFO] [stderr] Downloaded wasm-bindgen v0.2.103 [INFO] [stderr] Downloaded js-sys v0.3.80 [INFO] [stderr] Downloaded google-sheets4 v5.0.5+20240621 [INFO] [stderr] Downloaded cc v1.2.38 [INFO] [stderr] Downloaded serde_with v3.14.1 [INFO] [stderr] Downloaded yup-oauth2 v9.0.0 [INFO] [stderr] Downloaded google-apis-common v6.0.4 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.103 [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.103 [INFO] [stderr] Downloaded cliclack v0.2.5 [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] 2db722caa513cc9520202cf3b5c0de62610368706ce6e5c679f3d3b9d966fb2b [INFO] running `Command { std: "docker" "start" "-a" "2db722caa513cc9520202cf3b5c0de62610368706ce6e5c679f3d3b9d966fb2b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2db722caa513cc9520202cf3b5c0de62610368706ce6e5c679f3d3b9d966fb2b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2db722caa513cc9520202cf3b5c0de62610368706ce6e5c679f3d3b9d966fb2b", kill_on_drop: false }` [INFO] [stdout] 2db722caa513cc9520202cf3b5c0de62610368706ce6e5c679f3d3b9d966fb2b [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] 0608f3fc905b7d9ef35ed1051a18c7979c338a40f08197886a76ef5f71b71566 [INFO] running `Command { std: "docker" "start" "-a" "0608f3fc905b7d9ef35ed1051a18c7979c338a40f08197886a76ef5f71b71566", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling unicode-ident v1.0.19 [INFO] [stderr] Compiling libc v0.2.175 [INFO] [stderr] Checking cfg-if v1.0.3 [INFO] [stderr] Compiling serde_core v1.0.226 [INFO] [stderr] Compiling serde v1.0.226 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling parking_lot_core v0.9.11 [INFO] [stderr] Compiling find-msvc-tools v0.1.2 [INFO] [stderr] Checking memchr v2.7.5 [INFO] [stderr] Compiling cc v1.2.38 [INFO] [stderr] Checking indexmap v2.11.4 [INFO] [stderr] Compiling rustls v0.22.4 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Checking tinyvec v1.10.0 [INFO] [stderr] Checking unicode-width v0.2.1 [INFO] [stderr] Compiling portable-atomic v1.11.1 [INFO] [stderr] Checking unicode-normalization v0.1.24 [INFO] [stderr] Checking unicode-bidi v0.3.18 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking socket2 v0.6.0 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Checking signal-hook-registry v1.4.6 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking iana-time-zone v0.1.64 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking idna v0.1.5 [INFO] [stderr] Checking console v0.15.11 [INFO] [stderr] Checking winnow v0.7.13 [INFO] [stderr] Checking percent-encoding v1.0.1 [INFO] [stderr] Checking unicode-linebreak v0.1.5 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Checking smawk v0.3.2 [INFO] [stderr] Checking url v1.7.2 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking textwrap v0.16.2 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking indicatif v0.17.11 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking serde_json v1.0.145 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling darling_core v0.21.3 [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 serde_derive v1.0.226 [INFO] [stderr] Compiling zeroize_derive v1.4.2 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Checking zeroize v1.8.1 [INFO] [stderr] Checking rustls-pki-types v1.12.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking rustls-webpki v0.102.8 [INFO] [stderr] Checking rustls-pemfile v2.2.0 [INFO] [stderr] Checking tokio v1.47.1 [INFO] [stderr] Checking rustls-native-certs v0.7.3 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking cliclack v0.2.5 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.4 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Compiling darling_macro v0.21.3 [INFO] [stderr] Compiling darling v0.21.3 [INFO] [stderr] Compiling serde_with_macros v3.14.1 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.3 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking deranged v0.5.3 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking serde_with v3.14.1 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking time v0.3.44 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking tokio-util v0.7.16 [INFO] [stderr] Checking tokio-rustls v0.25.0 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking hyper-rustls v0.25.0 [INFO] [stderr] Checking yup-oauth2 v9.0.0 [INFO] [stderr] Checking google-apis-common v6.0.4 [INFO] [stderr] Checking google-sheets4 v5.0.5+20240621 [INFO] [stderr] Checking habit_tracker v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:28:29 [INFO] [stdout] | [INFO] [stdout] 28 | let habits = get_habits(&values, month_index.clone()); [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/data_updater.rs:28:38 [INFO] [stdout] | [INFO] [stdout] 28 | let habits = get_habits(&values, month_index.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*month_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | &app_config, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `app_config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | &hub, [INFO] [stdout] | ^^^^ help: change this to: `hub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/data_updater.rs:49:1 [INFO] [stdout] | [INFO] [stdout] 49 | / pub async fn bulk_update( [INFO] [stdout] 50 | | hub: &Sheets>, [INFO] [stdout] 51 | | app_config: &AppConfig, [INFO] [stdout] 52 | | values: &mut Vec>, [INFO] [stdout] ... | [INFO] [stdout] 57 | | cur_month: &String, [INFO] [stdout] 58 | | ) { [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/data_updater.rs:71:65 [INFO] [stdout] | [INFO] [stdout] 71 | habit_selector = habit_selector.item(habit.clone(), &habit, ""); [INFO] [stdout] | ^^^^^^ help: change this to: `habit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/data_updater.rs:81:48 [INFO] [stdout] | [INFO] [stdout] 81 | date_selector = date_selector.item(date.clone(), &date, ""); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/data_updater.rs:81:62 [INFO] [stdout] | [INFO] [stdout] 81 | date_selector = date_selector.item(date.clone(), &date, ""); [INFO] [stdout] | ^^^^^ help: change this to: `date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | &selected_dates, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `selected_dates` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | &selected_habits, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `selected_habits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | &habits, [INFO] [stdout] | ^^^^^^^ help: change this to: `habits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | &dates, [INFO] [stdout] | ^^^^^^ help: change this to: `dates` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | &cur_month, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `cur_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | &app_config, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `app_config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | &hub, [INFO] [stdout] | ^^^^ help: change this to: `hub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_updater.rs:118:1 [INFO] [stdout] | [INFO] [stdout] 118 | / pub async fn update_activities( [INFO] [stdout] 119 | | selected_dates: &HashMap, [INFO] [stdout] 120 | | selected_habits: &HashMap, [INFO] [stdout] 121 | | habits: &HashMap, [INFO] [stdout] ... | [INFO] [stdout] 129 | | update_value: bool, [INFO] [stdout] 130 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:178:17 [INFO] [stdout] | [INFO] [stdout] 178 | &selected_dates, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `selected_dates` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:179:17 [INFO] [stdout] | [INFO] [stdout] 179 | &selected_habits, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `selected_habits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:180:17 [INFO] [stdout] | [INFO] [stdout] 180 | &habits, [INFO] [stdout] | ^^^^^^^ help: change this to: `habits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:181:17 [INFO] [stdout] | [INFO] [stdout] 181 | &dates, [INFO] [stdout] | ^^^^^^ help: change this to: `dates` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:182:17 [INFO] [stdout] | [INFO] [stdout] 182 | &values, [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/helpers.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn repeat_cell_request( [INFO] [stdout] 23 | | sheet_id: i32, [INFO] [stdout] 24 | | start_row: i32, [INFO] [stdout] 25 | | end_row: i32, [INFO] [stdout] ... | [INFO] [stdout] 32 | | horizontal_alignment: String, [INFO] [stdout] 33 | | ) -> Request { [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/helpers.rs:179:11 [INFO] [stdout] | [INFO] [stdout] 179 | ..DimensionRange { [INFO] [stdout] | ___________^ [INFO] [stdout] 180 | | sheet_id: None, [INFO] [stdout] 181 | | dimension: None, [INFO] [stdout] 182 | | start_index: None, [INFO] [stdout] 183 | | end_index: None, [INFO] [stdout] 184 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] = note: `#[warn(clippy::needless_update)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:100:28 [INFO] [stdout] | [INFO] [stdout] 100 | generate_sheet(&hub, &app_config, &app_config.sheet_name, Some(0)).await; [INFO] [stdout] | ^^^^ help: change this to: `hub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:100:34 [INFO] [stdout] | [INFO] [stdout] 100 | generate_sheet(&hub, &app_config, &app_config.sheet_name, Some(0)).await; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `app_config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:101:56 [INFO] [stdout] | [INFO] [stdout] 101 | let (_, sheet_id) = generate_template_grid(&hub, &app_config, &wib).await; [INFO] [stdout] | ^^^^ help: change this to: `hub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:101:62 [INFO] [stdout] | [INFO] [stdout] 101 | let (_, sheet_id) = generate_template_grid(&hub, &app_config, &wib).await; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `app_config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:101:75 [INFO] [stdout] | [INFO] [stdout] 101 | let (_, sheet_id) = generate_template_grid(&hub, &app_config, &wib).await; [INFO] [stdout] | ^^^^ help: change this to: `wib` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:102:35 [INFO] [stdout] | [INFO] [stdout] 102 | auto_resize_dimension(&hub, &app_config, sheet_id).await; [INFO] [stdout] | ^^^^ help: change this to: `hub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:102:41 [INFO] [stdout] | [INFO] [stdout] 102 | auto_resize_dimension(&hub, &app_config, sheet_id).await; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `app_config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/init.rs:128:29 [INFO] [stdout] | [INFO] [stdout] 128 | pub fn valid_months(values: &Vec>) -> HashMap { [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] 128 - pub fn valid_months(values: &Vec>) -> HashMap { [INFO] [stdout] 128 + pub fn valid_months(values: &[Vec]) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `row.get(0)` [INFO] [stdout] --> src/init.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 133 | row.get(0) [INFO] [stdout] | ^^^^^^^^^^ help: try: `row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/interaction.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 12 | let is_exit = is_exit_selector.interact().unwrap(); [INFO] [stdout] | --------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 13 | is_exit [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 ~ is_exit_selector.interact().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/interaction.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 21 | let update_value = update_value_selector.interact().unwrap(); [INFO] [stdout] | ------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 22 | update_value [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] 21 ~ [INFO] [stdout] 22 ~ update_value_selector.interact().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/interaction.rs:28:6 [INFO] [stdout] | [INFO] [stdout] 28 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 29 | | HashMap, [INFO] [stdout] 30 | | HashMap, [INFO] [stdout] 31 | | String, [INFO] [stdout] 32 | | HashMap, [INFO] [stdout] 33 | | HashMap, [INFO] [stdout] 34 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/interaction.rs:54:37 [INFO] [stdout] | [INFO] [stdout] 54 | let habits = get_habits(values, index.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/interaction.rs:55:35 [INFO] [stdout] | [INFO] [stdout] 55 | let dates = get_dates(values, index.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/interaction.rs:76:44 [INFO] [stdout] | [INFO] [stdout] 76 | date_selector = date_selector.item(date.clone(), date, ""); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/interaction.rs:92:61 [INFO] [stdout] | [INFO] [stdout] 92 | habit_selector = habit_selector.item(habit.clone(), &habit, ""); [INFO] [stdout] | ^^^^^^ help: change this to: `habit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sheet_parser.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn get_active_habits(values: &Vec>, index: usize) -> HashMap { [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] 12 - pub fn get_active_habits(values: &Vec>, index: usize) -> HashMap { [INFO] [stdout] 12 + pub fn get_active_habits(values: &[Vec], index: usize) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sheet_parser.rs:50:27 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn get_habits(values: &Vec>, index: usize) -> HashMap { [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] 50 - pub fn get_habits(values: &Vec>, index: usize) -> HashMap { [INFO] [stdout] 50 + pub fn get_habits(values: &[Vec], index: usize) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `values[i].get(0)` [INFO] [stdout] --> src/sheet_parser.rs:55:29 [INFO] [stdout] | [INFO] [stdout] 55 | if let Some(cell) = values[i].get(0).and_then(|c| c.as_str()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `values[i].first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sheet_parser.rs:76:35 [INFO] [stdout] | [INFO] [stdout] 76 | if cell.is_empty() || !cell.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cell.parse::().is_err()` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sheet_parser.rs:69:26 [INFO] [stdout] | [INFO] [stdout] 69 | pub fn get_dates(values: &Vec>, index: usize) -> HashMap { [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] 69 - pub fn get_dates(values: &Vec>, index: usize) -> HashMap { [INFO] [stdout] 69 + pub fn get_dates(values: &[Vec], index: usize) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `row.get(0)` [INFO] [stdout] --> src/sheet_parser.rs:128:30 [INFO] [stdout] | [INFO] [stdout] 128 | let habit_name = row [INFO] [stdout] | ______________________________^ [INFO] [stdout] 129 | | .get(0) [INFO] [stdout] | |_______________________^ help: try: `row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sheet_parser.rs:161:13 [INFO] [stdout] | [INFO] [stdout] 161 | values: &Vec>, [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] 161 - values: &Vec>, [INFO] [stdout] 161 + values: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/sheet_parser.rs:179:27 [INFO] [stdout] | [INFO] [stdout] 179 | for (habit, _) in selected_habits { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 179 - for (habit, _) in selected_habits { [INFO] [stdout] 179 + for habit in selected_habits.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/sheet_parser.rs:236:5 [INFO] [stdout] | [INFO] [stdout] 224 | / let sheet_id = spreadsheet [INFO] [stdout] 225 | | .sheets [INFO] [stdout] 226 | | .as_ref() [INFO] [stdout] 227 | | .and_then(|sheets| { [INFO] [stdout] ... | [INFO] [stdout] 233 | | }) [INFO] [stdout] 234 | | .unwrap_or_else(|| panic!("Sheet id for {} not found!", sheet_name)); [INFO] [stdout] | |_____________________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 235 | [INFO] [stdout] 236 | sheet_id [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] 224 ~ [INFO] [stdout] 225 | [INFO] [stdout] 226 ~ spreadsheet [INFO] [stdout] 227 + .sheets [INFO] [stdout] 228 + .as_ref() [INFO] [stdout] 229 + .and_then(|sheets| { [INFO] [stdout] 230 + sheets [INFO] [stdout] 231 + .iter() [INFO] [stdout] 232 + .filter_map(|sheet| sheet.properties.as_ref()) [INFO] [stdout] 233 + .find(|props| props.title.as_deref() == Some(sheet_name)) [INFO] [stdout] 234 + .and_then(|props| props.sheet_id) [INFO] [stdout] 235 + }) [INFO] [stdout] 236 + .unwrap_or_else(|| panic!("Sheet id for {} not found!", sheet_name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/sheet_parser.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | for (_, col) in &dates { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 245 - for (_, col) in &dates { [INFO] [stdout] 245 + for col in dates.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/sheet_parser.rs:323:9 [INFO] [stdout] | [INFO] [stdout] 323 | total_exp = total_exp + score; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total_exp += score` [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: called `.iter().count()` on a `HashMap` [INFO] [stdout] --> src/template_builder.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | let n_row: i32 = (habits.iter().count() + 2) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `habits.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/template_builder.rs:126:28 [INFO] [stdout] | [INFO] [stdout] 126 | let update_value = String::from(format!("{current_month}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{current_month}")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/template_builder.rs:126:41 [INFO] [stdout] | [INFO] [stdout] 126 | let update_value = String::from(format!("{current_month}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `current_month.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/template_builder.rs:139:28 [INFO] [stdout] | [INFO] [stdout] 139 | let update_value = String::from(format!("{habit}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{habit}")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/template_builder.rs:139:41 [INFO] [stdout] | [INFO] [stdout] 139 | let update_value = String::from(format!("{habit}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `habit.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/template_builder.rs:152:28 [INFO] [stdout] | [INFO] [stdout] 152 | let update_value = String::from(format!("{}", i)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{}", i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/template_builder.rs:385:5 [INFO] [stdout] | [INFO] [stdout] 379 | / let sheet = hub [INFO] [stdout] 380 | | .spreadsheets() [INFO] [stdout] 381 | | .values_get(&app_config.spreadsheet_id, "Config!A1:C100") [INFO] [stdout] 382 | | .doit() [INFO] [stdout] 383 | | .await; [INFO] [stdout] | |_______________- unnecessary `let` binding [INFO] [stdout] 384 | [INFO] [stdout] 385 | sheet [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] 379 ~ [INFO] [stdout] 380 | [INFO] [stdout] 381 ~ hub [INFO] [stdout] 382 + .spreadsheets() [INFO] [stdout] 383 + .values_get(&app_config.spreadsheet_id, "Config!A1:C100") [INFO] [stdout] 384 + .doit() [INFO] [stdout] 385 + .await [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/template_builder.rs:292:32 [INFO] [stdout] | [INFO] [stdout] 292 | let update_value = String::from(format!("{column}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{column}")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/template_builder.rs:292:45 [INFO] [stdout] | [INFO] [stdout] 292 | let update_value = String::from(format!("{column}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `column.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/template_builder.rs:302:9 [INFO] [stdout] | [INFO] [stdout] 302 | habit_table_column.iter().count() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `habit_table_column.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/template_builder.rs:306:28 [INFO] [stdout] | [INFO] [stdout] 306 | let update_value = String::from(format!("{habit}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{habit}")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/template_builder.rs:306:41 [INFO] [stdout] | [INFO] [stdout] 306 | let update_value = String::from(format!("{habit}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `habit.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/template_builder.rs:358:10 [INFO] [stdout] | [INFO] [stdout] 358 | (habits.iter().count() + 1) as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `habits.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/main.rs:25:33 [INFO] [stdout] | [INFO] [stdout] 25 | use std::{collections::HashMap, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` 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: you seem to want to iterate on a map's values [INFO] [stdout] --> src/main.rs:162:48 [INFO] [stdout] | [INFO] [stdout] 162 | for (_, date_index) in ¤t_month_dates { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 162 - for (_, date_index) in ¤t_month_dates { [INFO] [stdout] 162 + for date_index in current_month_dates.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:244:42 [INFO] [stdout] | [INFO] [stdout] 244 | let min_index = (group.iter().min().unwrap().clone() as i32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*group.iter().min().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:246:42 [INFO] [stdout] | [INFO] [stdout] 246 | let max_index = (group.iter().max().unwrap().clone() as i32) + 1 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*group.iter().max().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:252:25 [INFO] [stdout] | [INFO] [stdout] 252 | / previous_group_deleted_row = [INFO] [stdout] 253 | | previous_group_deleted_row + (max_index - min_index); [INFO] [stdout] | |________________________________________________________________________________^ help: replace it with: `previous_group_deleted_row += (max_index - min_index)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/helpers.rs:94:41 [INFO] [stdout] | [INFO] [stdout] 94 | fields: Some(FieldMask::new(&vec![ [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 95 | | "userEnteredFormat.backgroundColor".to_string(), [INFO] [stdout] 96 | | "userEnteredFormat.textFormat.foregroundColor".to_string(), [INFO] [stdout] 97 | | "userEnteredFormat.textFormat.fontSize".to_string(), [INFO] [stdout] 98 | | "userEnteredFormat.horizontalAlignment".to_string(), [INFO] [stdout] 99 | | ])), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 94 ~ fields: Some(FieldMask::new(&["userEnteredFormat.backgroundColor".to_string(), [INFO] [stdout] 95 + "userEnteredFormat.textFormat.foregroundColor".to_string(), [INFO] [stdout] 96 + "userEnteredFormat.textFormat.fontSize".to_string(), [INFO] [stdout] 97 ~ "userEnteredFormat.horizontalAlignment".to_string()])), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/helpers.rs:328:41 [INFO] [stdout] | [INFO] [stdout] 328 | fields: Some(FieldMask::new(&vec!["*".to_string()])), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&["*".to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/template_builder.rs:290:34 [INFO] [stdout] | [INFO] [stdout] 290 | let habit_table_column = vec!["Habit", "IsComplete", "IsActive"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["Habit", "IsComplete", "IsActive"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:28:29 [INFO] [stdout] | [INFO] [stdout] 28 | let habits = get_habits(&values, month_index.clone()); [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/data_updater.rs:28:38 [INFO] [stdout] | [INFO] [stdout] 28 | let habits = get_habits(&values, month_index.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*month_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | &app_config, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `app_config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | &hub, [INFO] [stdout] | ^^^^ help: change this to: `hub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/data_updater.rs:49:1 [INFO] [stdout] | [INFO] [stdout] 49 | / pub async fn bulk_update( [INFO] [stdout] 50 | | hub: &Sheets>, [INFO] [stdout] 51 | | app_config: &AppConfig, [INFO] [stdout] 52 | | values: &mut Vec>, [INFO] [stdout] ... | [INFO] [stdout] 57 | | cur_month: &String, [INFO] [stdout] 58 | | ) { [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/data_updater.rs:71:65 [INFO] [stdout] | [INFO] [stdout] 71 | habit_selector = habit_selector.item(habit.clone(), &habit, ""); [INFO] [stdout] | ^^^^^^ help: change this to: `habit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/data_updater.rs:81:48 [INFO] [stdout] | [INFO] [stdout] 81 | date_selector = date_selector.item(date.clone(), &date, ""); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/data_updater.rs:81:62 [INFO] [stdout] | [INFO] [stdout] 81 | date_selector = date_selector.item(date.clone(), &date, ""); [INFO] [stdout] | ^^^^^ help: change this to: `date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | &selected_dates, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `selected_dates` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | &selected_habits, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `selected_habits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | &habits, [INFO] [stdout] | ^^^^^^^ help: change this to: `habits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | &dates, [INFO] [stdout] | ^^^^^^ help: change this to: `dates` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | &cur_month, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `cur_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | &app_config, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `app_config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | &hub, [INFO] [stdout] | ^^^^ help: change this to: `hub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/data_updater.rs:118:1 [INFO] [stdout] | [INFO] [stdout] 118 | / pub async fn update_activities( [INFO] [stdout] 119 | | selected_dates: &HashMap, [INFO] [stdout] 120 | | selected_habits: &HashMap, [INFO] [stdout] 121 | | habits: &HashMap, [INFO] [stdout] ... | [INFO] [stdout] 129 | | update_value: bool, [INFO] [stdout] 130 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:178:17 [INFO] [stdout] | [INFO] [stdout] 178 | &selected_dates, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `selected_dates` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:179:17 [INFO] [stdout] | [INFO] [stdout] 179 | &selected_habits, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `selected_habits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:180:17 [INFO] [stdout] | [INFO] [stdout] 180 | &habits, [INFO] [stdout] | ^^^^^^^ help: change this to: `habits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:181:17 [INFO] [stdout] | [INFO] [stdout] 181 | &dates, [INFO] [stdout] | ^^^^^^ help: change this to: `dates` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/data_updater.rs:182:17 [INFO] [stdout] | [INFO] [stdout] 182 | &values, [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/helpers.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn repeat_cell_request( [INFO] [stdout] 23 | | sheet_id: i32, [INFO] [stdout] 24 | | start_row: i32, [INFO] [stdout] 25 | | end_row: i32, [INFO] [stdout] ... | [INFO] [stdout] 32 | | horizontal_alignment: String, [INFO] [stdout] 33 | | ) -> Request { [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/helpers.rs:179:11 [INFO] [stdout] | [INFO] [stdout] 179 | ..DimensionRange { [INFO] [stdout] | ___________^ [INFO] [stdout] 180 | | sheet_id: None, [INFO] [stdout] 181 | | dimension: None, [INFO] [stdout] 182 | | start_index: None, [INFO] [stdout] 183 | | end_index: None, [INFO] [stdout] 184 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] = note: `#[warn(clippy::needless_update)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:100:28 [INFO] [stdout] | [INFO] [stdout] 100 | generate_sheet(&hub, &app_config, &app_config.sheet_name, Some(0)).await; [INFO] [stdout] | ^^^^ help: change this to: `hub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:100:34 [INFO] [stdout] | [INFO] [stdout] 100 | generate_sheet(&hub, &app_config, &app_config.sheet_name, Some(0)).await; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `app_config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:101:56 [INFO] [stdout] | [INFO] [stdout] 101 | let (_, sheet_id) = generate_template_grid(&hub, &app_config, &wib).await; [INFO] [stdout] | ^^^^ help: change this to: `hub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:101:62 [INFO] [stdout] | [INFO] [stdout] 101 | let (_, sheet_id) = generate_template_grid(&hub, &app_config, &wib).await; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `app_config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:101:75 [INFO] [stdout] | [INFO] [stdout] 101 | let (_, sheet_id) = generate_template_grid(&hub, &app_config, &wib).await; [INFO] [stdout] | ^^^^ help: change this to: `wib` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:102:35 [INFO] [stdout] | [INFO] [stdout] 102 | auto_resize_dimension(&hub, &app_config, sheet_id).await; [INFO] [stdout] | ^^^^ help: change this to: `hub` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/init.rs:102:41 [INFO] [stdout] | [INFO] [stdout] 102 | auto_resize_dimension(&hub, &app_config, sheet_id).await; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `app_config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/init.rs:128:29 [INFO] [stdout] | [INFO] [stdout] 128 | pub fn valid_months(values: &Vec>) -> HashMap { [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] 128 - pub fn valid_months(values: &Vec>) -> HashMap { [INFO] [stdout] 128 + pub fn valid_months(values: &[Vec]) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `row.get(0)` [INFO] [stdout] --> src/init.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 133 | row.get(0) [INFO] [stdout] | ^^^^^^^^^^ help: try: `row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/interaction.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 12 | let is_exit = is_exit_selector.interact().unwrap(); [INFO] [stdout] | --------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 13 | is_exit [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 ~ is_exit_selector.interact().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/interaction.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 21 | let update_value = update_value_selector.interact().unwrap(); [INFO] [stdout] | ------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 22 | update_value [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] 21 ~ [INFO] [stdout] 22 ~ update_value_selector.interact().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/interaction.rs:28:6 [INFO] [stdout] | [INFO] [stdout] 28 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 29 | | HashMap, [INFO] [stdout] 30 | | HashMap, [INFO] [stdout] 31 | | String, [INFO] [stdout] 32 | | HashMap, [INFO] [stdout] 33 | | HashMap, [INFO] [stdout] 34 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/interaction.rs:54:37 [INFO] [stdout] | [INFO] [stdout] 54 | let habits = get_habits(values, index.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/interaction.rs:55:35 [INFO] [stdout] | [INFO] [stdout] 55 | let dates = get_dates(values, index.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/interaction.rs:76:44 [INFO] [stdout] | [INFO] [stdout] 76 | date_selector = date_selector.item(date.clone(), date, ""); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/interaction.rs:92:61 [INFO] [stdout] | [INFO] [stdout] 92 | habit_selector = habit_selector.item(habit.clone(), &habit, ""); [INFO] [stdout] | ^^^^^^ help: change this to: `habit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sheet_parser.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn get_active_habits(values: &Vec>, index: usize) -> HashMap { [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] 12 - pub fn get_active_habits(values: &Vec>, index: usize) -> HashMap { [INFO] [stdout] 12 + pub fn get_active_habits(values: &[Vec], index: usize) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sheet_parser.rs:50:27 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn get_habits(values: &Vec>, index: usize) -> HashMap { [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] 50 - pub fn get_habits(values: &Vec>, index: usize) -> HashMap { [INFO] [stdout] 50 + pub fn get_habits(values: &[Vec], index: usize) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `values[i].get(0)` [INFO] [stdout] --> src/sheet_parser.rs:55:29 [INFO] [stdout] | [INFO] [stdout] 55 | if let Some(cell) = values[i].get(0).and_then(|c| c.as_str()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `values[i].first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sheet_parser.rs:76:35 [INFO] [stdout] | [INFO] [stdout] 76 | if cell.is_empty() || !cell.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cell.parse::().is_err()` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sheet_parser.rs:69:26 [INFO] [stdout] | [INFO] [stdout] 69 | pub fn get_dates(values: &Vec>, index: usize) -> HashMap { [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] 69 - pub fn get_dates(values: &Vec>, index: usize) -> HashMap { [INFO] [stdout] 69 + pub fn get_dates(values: &[Vec], index: usize) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `row.get(0)` [INFO] [stdout] --> src/sheet_parser.rs:128:30 [INFO] [stdout] | [INFO] [stdout] 128 | let habit_name = row [INFO] [stdout] | ______________________________^ [INFO] [stdout] 129 | | .get(0) [INFO] [stdout] | |_______________________^ help: try: `row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sheet_parser.rs:161:13 [INFO] [stdout] | [INFO] [stdout] 161 | values: &Vec>, [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] 161 - values: &Vec>, [INFO] [stdout] 161 + values: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/sheet_parser.rs:179:27 [INFO] [stdout] | [INFO] [stdout] 179 | for (habit, _) in selected_habits { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 179 - for (habit, _) in selected_habits { [INFO] [stdout] 179 + for habit in selected_habits.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/sheet_parser.rs:236:5 [INFO] [stdout] | [INFO] [stdout] 224 | / let sheet_id = spreadsheet [INFO] [stdout] 225 | | .sheets [INFO] [stdout] 226 | | .as_ref() [INFO] [stdout] 227 | | .and_then(|sheets| { [INFO] [stdout] ... | [INFO] [stdout] 233 | | }) [INFO] [stdout] 234 | | .unwrap_or_else(|| panic!("Sheet id for {} not found!", sheet_name)); [INFO] [stdout] | |_____________________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 235 | [INFO] [stdout] 236 | sheet_id [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] 224 ~ [INFO] [stdout] 225 | [INFO] [stdout] 226 ~ spreadsheet [INFO] [stdout] 227 + .sheets [INFO] [stdout] 228 + .as_ref() [INFO] [stdout] 229 + .and_then(|sheets| { [INFO] [stdout] 230 + sheets [INFO] [stdout] 231 + .iter() [INFO] [stdout] 232 + .filter_map(|sheet| sheet.properties.as_ref()) [INFO] [stdout] 233 + .find(|props| props.title.as_deref() == Some(sheet_name)) [INFO] [stdout] 234 + .and_then(|props| props.sheet_id) [INFO] [stdout] 235 + }) [INFO] [stdout] 236 + .unwrap_or_else(|| panic!("Sheet id for {} not found!", sheet_name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/sheet_parser.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | for (_, col) in &dates { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 245 - for (_, col) in &dates { [INFO] [stdout] 245 + for col in dates.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/sheet_parser.rs:323:9 [INFO] [stdout] | [INFO] [stdout] 323 | total_exp = total_exp + score; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total_exp += score` [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: called `.iter().count()` on a `HashMap` [INFO] [stdout] --> src/template_builder.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | let n_row: i32 = (habits.iter().count() + 2) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `habits.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/template_builder.rs:126:28 [INFO] [stdout] | [INFO] [stdout] 126 | let update_value = String::from(format!("{current_month}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{current_month}")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/template_builder.rs:126:41 [INFO] [stdout] | [INFO] [stdout] 126 | let update_value = String::from(format!("{current_month}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `current_month.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/template_builder.rs:139:28 [INFO] [stdout] | [INFO] [stdout] 139 | let update_value = String::from(format!("{habit}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{habit}")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/template_builder.rs:139:41 [INFO] [stdout] | [INFO] [stdout] 139 | let update_value = String::from(format!("{habit}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `habit.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/template_builder.rs:152:28 [INFO] [stdout] | [INFO] [stdout] 152 | let update_value = String::from(format!("{}", i)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{}", i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/template_builder.rs:385:5 [INFO] [stdout] | [INFO] [stdout] 379 | / let sheet = hub [INFO] [stdout] 380 | | .spreadsheets() [INFO] [stdout] 381 | | .values_get(&app_config.spreadsheet_id, "Config!A1:C100") [INFO] [stdout] 382 | | .doit() [INFO] [stdout] 383 | | .await; [INFO] [stdout] | |_______________- unnecessary `let` binding [INFO] [stdout] 384 | [INFO] [stdout] 385 | sheet [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] 379 ~ [INFO] [stdout] 380 | [INFO] [stdout] 381 ~ hub [INFO] [stdout] 382 + .spreadsheets() [INFO] [stdout] 383 + .values_get(&app_config.spreadsheet_id, "Config!A1:C100") [INFO] [stdout] 384 + .doit() [INFO] [stdout] 385 + .await [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/template_builder.rs:292:32 [INFO] [stdout] | [INFO] [stdout] 292 | let update_value = String::from(format!("{column}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{column}")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/template_builder.rs:292:45 [INFO] [stdout] | [INFO] [stdout] 292 | let update_value = String::from(format!("{column}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `column.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/template_builder.rs:302:9 [INFO] [stdout] | [INFO] [stdout] 302 | habit_table_column.iter().count() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `habit_table_column.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/template_builder.rs:306:28 [INFO] [stdout] | [INFO] [stdout] 306 | let update_value = String::from(format!("{habit}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{habit}")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/template_builder.rs:306:41 [INFO] [stdout] | [INFO] [stdout] 306 | let update_value = String::from(format!("{habit}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `habit.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/template_builder.rs:358:10 [INFO] [stdout] | [INFO] [stdout] 358 | (habits.iter().count() + 1) as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `habits.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/main.rs:25:33 [INFO] [stdout] | [INFO] [stdout] 25 | use std::{collections::HashMap, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` 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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 21s [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/main.rs:162:48 [INFO] [stdout] | [INFO] [stdout] 162 | for (_, date_index) in ¤t_month_dates { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 162 - for (_, date_index) in ¤t_month_dates { [INFO] [stdout] 162 + for date_index in current_month_dates.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:244:42 [INFO] [stdout] | [INFO] [stdout] 244 | let min_index = (group.iter().min().unwrap().clone() as i32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*group.iter().min().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:246:42 [INFO] [stdout] | [INFO] [stdout] 246 | let max_index = (group.iter().max().unwrap().clone() as i32) + 1 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*group.iter().max().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:252:25 [INFO] [stdout] | [INFO] [stdout] 252 | / previous_group_deleted_row = [INFO] [stdout] 253 | | previous_group_deleted_row + (max_index - min_index); [INFO] [stdout] | |________________________________________________________________________________^ help: replace it with: `previous_group_deleted_row += (max_index - min_index)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/helpers.rs:94:41 [INFO] [stdout] | [INFO] [stdout] 94 | fields: Some(FieldMask::new(&vec![ [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 95 | | "userEnteredFormat.backgroundColor".to_string(), [INFO] [stdout] 96 | | "userEnteredFormat.textFormat.foregroundColor".to_string(), [INFO] [stdout] 97 | | "userEnteredFormat.textFormat.fontSize".to_string(), [INFO] [stdout] 98 | | "userEnteredFormat.horizontalAlignment".to_string(), [INFO] [stdout] 99 | | ])), [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 94 ~ fields: Some(FieldMask::new(&["userEnteredFormat.backgroundColor".to_string(), [INFO] [stdout] 95 + "userEnteredFormat.textFormat.foregroundColor".to_string(), [INFO] [stdout] 96 + "userEnteredFormat.textFormat.fontSize".to_string(), [INFO] [stdout] 97 ~ "userEnteredFormat.horizontalAlignment".to_string()])), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/helpers.rs:328:41 [INFO] [stdout] | [INFO] [stdout] 328 | fields: Some(FieldMask::new(&vec!["*".to_string()])), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&["*".to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/template_builder.rs:290:34 [INFO] [stdout] | [INFO] [stdout] 290 | let habit_table_column = vec!["Habit", "IsComplete", "IsActive"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["Habit", "IsComplete", "IsActive"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "0608f3fc905b7d9ef35ed1051a18c7979c338a40f08197886a76ef5f71b71566", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0608f3fc905b7d9ef35ed1051a18c7979c338a40f08197886a76ef5f71b71566", kill_on_drop: false }` [INFO] [stdout] 0608f3fc905b7d9ef35ed1051a18c7979c338a40f08197886a76ef5f71b71566