[INFO] cloning repository https://github.com/rikardbq/sqlite_server [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/rikardbq/sqlite_server" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frikardbq%2Fsqlite_server", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frikardbq%2Fsqlite_server'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 72124054ccd2bebc58f2173866d5eafabe0f32c6 [INFO] linting rikardbq/sqlite_server against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frikardbq%2Fsqlite_server" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/rikardbq/sqlite_server [INFO] finished tweaking git repo https://github.com/rikardbq/sqlite_server [INFO] tweaked toml for git repo https://github.com/rikardbq/sqlite_server written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/rikardbq/sqlite_server 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/rikardbq/sqlite_server 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] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded protoc-bin-vendored v3.1.0 [INFO] [stderr] Downloaded sqlx-macros v0.8.5 [INFO] [stderr] Downloaded sqlx-macros-core v0.8.5 [INFO] [stderr] Downloaded seize v0.5.0 [INFO] [stderr] Downloaded sqlx-mysql v0.8.5 [INFO] [stderr] Downloaded papaya v0.2.1 [INFO] [stderr] Downloaded sqlx-core v0.8.5 [INFO] [stderr] Downloaded sqlx-sqlite v0.8.5 [INFO] [stderr] Downloaded sqlx-postgres v0.8.5 [INFO] [stderr] Downloaded sqlx v0.8.5 [INFO] [stderr] Downloaded protoc-bin-vendored-macos-aarch_64 v3.1.0 [INFO] [stderr] Downloaded protoc-bin-vendored-macos-x86_64 v3.1.0 [INFO] [stderr] Downloaded protoc-bin-vendored-win32 v3.1.0 [INFO] [stderr] Downloaded protoc-bin-vendored-linux-x86_64 v3.1.0 [INFO] [stderr] Downloaded protoc-bin-vendored-linux-aarch_64 v3.1.0 [INFO] [stderr] Downloaded protoc-bin-vendored-linux-ppcle_64 v3.1.0 [INFO] [stderr] Downloaded protoc-bin-vendored-linux-x86_32 v3.1.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 9d9cb61b09c8dc388dda95ade3f36b164717931b3634673b2efb4b677d15e32a [INFO] running `Command { std: "docker" "start" "-a" "9d9cb61b09c8dc388dda95ade3f36b164717931b3634673b2efb4b677d15e32a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9d9cb61b09c8dc388dda95ade3f36b164717931b3634673b2efb4b677d15e32a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9d9cb61b09c8dc388dda95ade3f36b164717931b3634673b2efb4b677d15e32a", kill_on_drop: false }` [INFO] [stdout] 9d9cb61b09c8dc388dda95ade3f36b164717931b3634673b2efb4b677d15e32a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 03039e52f779e43d5ba03dd696c1f9f33ce021600df1b752e3ccb65ae727f2a1 [INFO] running `Command { std: "docker" "start" "-a" "03039e52f779e43d5ba03dd696c1f9f33ce021600df1b752e3ccb65ae727f2a1", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling icu_locid_transform_data v1.5.1 [INFO] [stderr] Compiling icu_properties_data v1.5.1 [INFO] [stderr] Compiling icu_normalizer_data v1.5.1 [INFO] [stderr] Checking smallvec v1.15.0 [INFO] [stderr] Compiling stable_deref_trait v1.2.0 [INFO] [stderr] Compiling bytes v1.10.1 [INFO] [stderr] Compiling writeable v0.5.5 [INFO] [stderr] Compiling litemap v0.7.5 [INFO] [stderr] Compiling allocator-api2 v0.2.21 [INFO] [stderr] Compiling foldhash v0.1.5 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling futures-core v0.3.31 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Compiling utf16_iter v1.0.5 [INFO] [stderr] Compiling rustix v1.0.5 [INFO] [stderr] Compiling getrandom v0.3.2 [INFO] [stderr] Compiling futures-sink v0.3.31 [INFO] [stderr] Compiling write16 v1.0.0 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Compiling linux-raw-sys v0.9.4 [INFO] [stderr] Compiling bitflags v2.9.0 [INFO] [stderr] Compiling sha2 v0.10.8 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling fastrand v2.3.0 [INFO] [stderr] Compiling futures-task v0.3.31 [INFO] [stderr] Compiling zerocopy v0.8.24 [INFO] [stderr] Compiling futures-io v0.3.31 [INFO] [stderr] Compiling parking v2.2.1 [INFO] [stderr] Compiling spin v0.9.8 [INFO] [stderr] Compiling prettyplease v0.2.32 [INFO] [stderr] Compiling futures-util v0.3.31 [INFO] [stderr] Compiling base64 v0.22.1 [INFO] [stderr] Compiling regex-syntax v0.8.5 [INFO] [stderr] Compiling indexmap v2.9.0 [INFO] [stderr] Compiling hashlink v0.10.0 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking socket2 v0.5.9 [INFO] [stderr] Compiling flume v0.11.1 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Compiling concurrent-queue v2.5.0 [INFO] [stderr] Compiling crossbeam-queue v0.3.12 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Compiling fixedbitset v0.5.7 [INFO] [stderr] Compiling event-listener v5.4.0 [INFO] [stderr] Checking miniz_oxide v0.8.8 [INFO] [stderr] Compiling jobserver v0.1.33 [INFO] [stderr] Compiling cc v1.2.19 [INFO] [stderr] Compiling atoi v2.0.0 [INFO] [stderr] Compiling petgraph v0.7.1 [INFO] [stderr] Checking futures-intrusive v0.5.0 [INFO] [stderr] Checking brotli-decompressor v4.0.3 [INFO] [stderr] Compiling bytestring v1.4.0 [INFO] [stderr] Compiling tokio v1.44.2 [INFO] [stderr] Compiling protoc-bin-vendored-macos-aarch_64 v3.1.0 [INFO] [stderr] Compiling multimap v0.10.0 [INFO] [stderr] Compiling dotenvy v0.15.7 [INFO] [stderr] Compiling protoc-bin-vendored-linux-ppcle_64 v3.1.0 [INFO] [stderr] Checking predicates-core v1.0.9 [INFO] [stderr] Compiling protoc-bin-vendored-linux-aarch_64 v3.1.0 [INFO] [stderr] Compiling protoc-bin-vendored-linux-x86_32 v3.1.0 [INFO] [stderr] Compiling protoc-bin-vendored-macos-x86_64 v3.1.0 [INFO] [stderr] Compiling mockall_derive v0.13.1 [INFO] [stderr] Compiling protoc-bin-vendored-linux-x86_64 v3.1.0 [INFO] [stderr] Compiling protoc-bin-vendored-win32 v3.1.0 [INFO] [stderr] Checking flate2 v1.1.1 [INFO] [stderr] Compiling protoc-bin-vendored v3.1.0 [INFO] [stderr] Checking inotify-sys v0.1.5 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Compiling base16ct v0.2.0 [INFO] [stderr] Checking inotify v0.11.0 [INFO] [stderr] Checking predicates-tree v1.0.12 [INFO] [stderr] Checking predicates v3.1.3 [INFO] [stderr] Checking seize v0.5.0 [INFO] [stderr] Checking filetime v0.2.25 [INFO] [stderr] Checking fragile v2.0.1 [INFO] [stderr] Checking downcast v0.11.0 [INFO] [stderr] Compiling tempfile v3.19.1 [INFO] [stderr] Checking notify-types v2.0.0 [INFO] [stderr] Checking papaya v0.2.1 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking chrono v0.4.40 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking notify v8.0.0 [INFO] [stderr] Checking brotli v7.0.0 [INFO] [stderr] Compiling regex-automata v0.4.9 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Compiling libsqlite3-sys v0.30.1 [INFO] [stderr] Compiling zstd-sys v2.0.15+zstd.1.5.7 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Compiling futures-executor v0.3.31 [INFO] [stderr] Compiling regex v1.11.1 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling tracing-attributes v0.1.28 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Compiling actix-macros v0.2.4 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Compiling tokio-stream v0.1.17 [INFO] [stderr] Compiling yoke v0.7.5 [INFO] [stderr] Compiling zerovec v0.10.4 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Compiling tinystr v0.7.6 [INFO] [stderr] Compiling icu_collections v1.5.0 [INFO] [stderr] Compiling icu_locid v1.5.0 [INFO] [stderr] Checking derive_more v2.0.1 [INFO] [stderr] Compiling icu_provider v1.5.0 [INFO] [stderr] Compiling icu_locid_transform v1.5.0 [INFO] [stderr] Checking mockall v0.13.1 [INFO] [stderr] Compiling icu_properties v1.5.1 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking tokio-util v0.7.14 [INFO] [stderr] Checking actix-rt v2.10.0 [INFO] [stderr] Checking actix-server v2.5.1 [INFO] [stderr] Checking actix-codec v0.5.2 [INFO] [stderr] Checking h2 v0.3.26 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking actix-router v0.5.3 [INFO] [stderr] Compiling itertools v0.14.0 [INFO] [stderr] Checking sqlx-core v0.8.5 [INFO] [stderr] Compiling actix-web-codegen v4.3.0 [INFO] [stderr] Checking actix-http v3.10.0 [INFO] [stderr] Compiling prost-derive v0.13.5 [INFO] [stderr] Compiling prost v0.13.5 [INFO] [stderr] Checking sqlx-sqlite v0.8.5 [INFO] [stderr] Compiling prost-types v0.13.5 [INFO] [stderr] Checking actix-web v4.10.2 [INFO] [stderr] Compiling prost-build v0.13.5 [INFO] [stderr] Compiling sqlx-macros-core v0.8.5 [INFO] [stderr] Compiling serf v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> build.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use prost_build; [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: empty line after doc comment [INFO] [stdout] --> build.rs:19:1 [INFO] [stdout] | [INFO] [stdout] 19 | / /** [INFO] [stdout] 20 | | * let test = home_dir() [INFO] [stdout] 21 | | .unwrap_or(env::var_os("OUT_DIR").unwrap().into()) [INFO] [stdout] 22 | | .as_path(); [INFO] [stdout] 23 | | */ [INFO] [stdout] 24 | | [INFO] [stdout] | |_^ [INFO] [stdout] 25 | fn main() { [INFO] [stdout] | ------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> build.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | .unwrap_or(env::var_os("OUT_DIR").unwrap().into()) [INFO] [stdout] | ^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> build.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | .as_path(); [INFO] [stdout] | ^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling sqlx-macros v0.8.5 [INFO] [stderr] Checking sqlx v0.8.5 [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DatabaseManager` [INFO] [stdout] --> src/cli/util.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | / pub fn new() -> DatabaseManager { [INFO] [stdout] 31 | | let root_dir = Path::new(ROOT_DIR); [INFO] [stdout] 32 | | let cfg_path = root_dir.join("cfg"); [INFO] [stdout] 33 | | let consumer_db_base_path = root_dir.join("db"); [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 29 + impl Default for DatabaseManager { [INFO] [stdout] 30 + fn default() -> Self { [INFO] [stdout] 31 + Self::new() [INFO] [stdout] 32 + } [INFO] [stdout] 33 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cli/util.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | if !db_name.eq("") { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `db_name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli/util.rs:135:44 [INFO] [stdout] | [INFO] [stdout] 135 | let _ = fs::create_dir_all(&consumer_db_full_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `consumer_db_full_path` [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: comparison to empty slice [INFO] [stdout] --> src/cli/util.rs:156:13 [INFO] [stdout] | [INFO] [stdout] 156 | if !username.eq("") && !password.eq("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `username.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cli/util.rs:156:33 [INFO] [stdout] | [INFO] [stdout] 156 | if !username.eq("") && !password.eq("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `password.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cli/util.rs:194:13 [INFO] [stdout] | [INFO] [stdout] 194 | if !username.eq("") && !database_name.eq("") && access_right != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `username.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cli/util.rs:194:33 [INFO] [stdout] | [INFO] [stdout] 194 | if !username.eq("") && !database_name.eq("") && access_right != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `database_name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/cli/util.rs:205:13 [INFO] [stdout] | [INFO] [stdout] 205 | / let _ = match execute_query( [INFO] [stdout] 206 | | AppliedQuery::new(queries::UPSERT_USER_DATABASE_ACCESS).with_args(&vec![ [INFO] [stdout] 207 | | QueryArg::new(query_arg::Value::String(database_name)), [INFO] [stdout] 208 | | QueryArg::new(query_arg::Value::String(database_name_hash)), [INFO] [stdout] ... | [INFO] [stdout] 223 | | }; [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 205 - let _ = match execute_query( [INFO] [stdout] 205 + match execute_query( [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/cli/util.rs:230:34 [INFO] [stdout] | [INFO] [stdout] 230 | pub fn get_flag_val<'a, T>(args: &'a Vec, flag: &'a str) -> Option [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] 230 - pub fn get_flag_val<'a, T>(args: &'a Vec, flag: &'a str) -> Option [INFO] [stdout] 230 + pub fn get_flag_val<'a, T>(args: &'a [String], flag: &'a str) -> Option [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cli/util.rs:240:9 [INFO] [stdout] | [INFO] [stdout] 240 | / if args_flag == flag { [INFO] [stdout] 241 | | if !args_flag_val.starts_with("-") { [INFO] [stdout] 242 | | if let Ok(parsed_val) = args_flag_val.parse::() { [INFO] [stdout] 243 | | res = Some(parsed_val); [INFO] [stdout] ... | [INFO] [stdout] 249 | | }; [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] 240 ~ if args_flag == flag [INFO] [stdout] 241 ~ && !args_flag_val.starts_with("-") { [INFO] [stdout] 242 | if let Ok(parsed_val) = args_flag_val.parse::() { [INFO] [stdout] ... [INFO] [stdout] 247 | } [INFO] [stdout] 248 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'guard [INFO] [stdout] --> src/core/state.rs:45:33 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn insert_db_connection<'guard>( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | guard: &'guard impl Guard, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 45 ~ pub fn insert_db_connection( [INFO] [stdout] 46 | &self, [INFO] [stdout] 47 | db_name: &str, [INFO] [stdout] 48 | db_connection: SqlitePool, [INFO] [stdout] 49 ~ guard: &impl Guard, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/util.rs:73:47 [INFO] [stdout] | [INFO] [stdout] 73 | data.insert_db_connection(&db_name, conn, db_connections_guard); [INFO] [stdout] | ^^^^^^^^ help: change this to: `db_name` [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: length comparison to zero [INFO] [stdout] --> src/core/util.rs:100:8 [INFO] [stdout] | [INFO] [stdout] 100 | if app_state_users_pin.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!app_state_users_pin.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/web/controller/database.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | &db, [INFO] [stdout] | ^^^ help: change this to: `db` [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/web/controller/database.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 151 | &db, [INFO] [stdout] | ^^^ help: change this to: `db` [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: called `unwrap` on `self.data` after checking its variant with `is_some` [INFO] [stdout] --> src/web/proto.rs:144:46 [INFO] [stdout] | [INFO] [stdout] 133 | if self.data.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = self.data` [INFO] [stdout] ... [INFO] [stdout] 144 | let claims = generate_claims(self.data.unwrap(), self.subject.unwrap(), iat, exp); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/web/proto.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | / let mut buf = Vec::new(); [INFO] [stdout] 157 | | buf.reserve(request.encoded_len()); [INFO] [stdout] | |___________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut buf = Vec::with_capacity(request.encoded_len());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` 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/web/proto.rs:328:56 [INFO] [stdout] | [INFO] [stdout] 328 | let mut mac = match Hmac::::new_from_slice(&secret) { [INFO] [stdout] | ^^^^^^^ help: change this to: `secret` [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/web/proto.rs:333:16 [INFO] [stdout] | [INFO] [stdout] 333 | mac.update(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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 can be simplified using the `async fn` syntax [INFO] [stdout] --> src/web/util.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | / fn handle_fetch( [INFO] [stdout] 73 | | &self, [INFO] [stdout] 74 | | request_query: &QueryRequest, [INFO] [stdout] 75 | | ) -> impl Future> + Send { [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn [INFO] [stdout] = note: `#[warn(clippy::manual_async_fn)]` 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/web/util.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | &self.db, [INFO] [stdout] | ^^^^^^^^ help: change this to: `self.db` [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 can be simplified using the `async fn` syntax [INFO] [stdout] --> src/web/util.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | / fn handle_mutate( [INFO] [stdout] 100 | | &self, [INFO] [stdout] 101 | | request_query: &QueryRequest, [INFO] [stdout] 102 | | ) -> impl Future> + Send { [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function can be simplified using the `async fn` syntax [INFO] [stdout] --> src/web/util.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 136 | / fn handle_migrate( [INFO] [stdout] 137 | | &self, [INFO] [stdout] 138 | | migration: &MigrationRequest, [INFO] [stdout] 139 | | ) -> impl Future> + Send { [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/web/util.rs:201:39 [INFO] [stdout] | [INFO] [stdout] 201 | pub async fn get_proto_package_result<'a, T>( [INFO] [stdout] | ^^ [INFO] [stdout] 202 | claims: Claims, [INFO] [stdout] 203 | handler: &'a T, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/web/util.rs:240:24 [INFO] [stdout] | [INFO] [stdout] 240 | pub fn extract_headers<'a>(headers: &'a HeaderMap) -> Result<(&'a str, &'a str, &'a str), Error> { [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 240 - pub fn extract_headers<'a>(headers: &'a HeaderMap) -> Result<(&'a str, &'a str, &'a str), Error> { [INFO] [stdout] 240 + pub fn extract_headers(headers: &HeaderMap) -> Result<(&str, &str, &str), Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/cli/util.rs:168:67 [INFO] [stdout] | [INFO] [stdout] 168 | AppliedQuery::new(queries::INSERT_USER).with_args(&vec![ [INFO] [stdout] | ___________________________________________________________________^ [INFO] [stdout] 169 | | QueryArg::new(query_arg::Value::String(username)), [INFO] [stdout] 170 | | QueryArg::new(query_arg::Value::String(username_hash)), [INFO] [stdout] 171 | | QueryArg::new(query_arg::Value::String(username_password_hash)), [INFO] [stdout] 172 | | ]), [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] 168 ~ AppliedQuery::new(queries::INSERT_USER).with_args(&[QueryArg::new(query_arg::Value::String(username)), [INFO] [stdout] 169 + QueryArg::new(query_arg::Value::String(username_hash)), [INFO] [stdout] 170 ~ QueryArg::new(query_arg::Value::String(username_password_hash))]), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/cli/util.rs:206:83 [INFO] [stdout] | [INFO] [stdout] 206 | AppliedQuery::new(queries::UPSERT_USER_DATABASE_ACCESS).with_args(&vec![ [INFO] [stdout] | ___________________________________________________________________________________^ [INFO] [stdout] 207 | | QueryArg::new(query_arg::Value::String(database_name)), [INFO] [stdout] 208 | | QueryArg::new(query_arg::Value::String(database_name_hash)), [INFO] [stdout] 209 | | QueryArg::new(query_arg::Value::Int(access_right as i64)), [INFO] [stdout] 210 | | QueryArg::new(query_arg::Value::String(username_hash)), [INFO] [stdout] 211 | | ]), [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] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 206 ~ AppliedQuery::new(queries::UPSERT_USER_DATABASE_ACCESS).with_args(&[QueryArg::new(query_arg::Value::String(database_name)), [INFO] [stdout] 207 + QueryArg::new(query_arg::Value::String(database_name_hash)), [INFO] [stdout] 208 + QueryArg::new(query_arg::Value::Int(access_right as i64)), [INFO] [stdout] 209 ~ QueryArg::new(query_arg::Value::String(username_hash))]), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/web/util.rs:153:84 [INFO] [stdout] | [INFO] [stdout] 153 | ... AppliedQuery::new(queries::INSERT_MIGRATION).with_args(&vec![ [INFO] [stdout] | ______________________________________________________________________________^ [INFO] [stdout] 154 | | ... QueryArg::new(query_arg::Value::String(migration.name.clone())), [INFO] [stdout] 155 | | ... QueryArg::new(query_arg::Value::String(migration.query.clone())), [INFO] [stdout] 156 | | ... ]), [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] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 153 ~ AppliedQuery::new(queries::INSERT_MIGRATION).with_args(&[QueryArg::new(query_arg::Value::String(migration.name.clone())), [INFO] [stdout] 154 ~ QueryArg::new(query_arg::Value::String(migration.query.clone()))]), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DatabaseManager` [INFO] [stdout] --> src/cli/util.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | / pub fn new() -> DatabaseManager { [INFO] [stdout] 31 | | let root_dir = Path::new(ROOT_DIR); [INFO] [stdout] 32 | | let cfg_path = root_dir.join("cfg"); [INFO] [stdout] 33 | | let consumer_db_base_path = root_dir.join("db"); [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 29 + impl Default for DatabaseManager { [INFO] [stdout] 30 + fn default() -> Self { [INFO] [stdout] 31 + Self::new() [INFO] [stdout] 32 + } [INFO] [stdout] 33 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cli/util.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | if !db_name.eq("") { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `db_name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli/util.rs:135:44 [INFO] [stdout] | [INFO] [stdout] 135 | let _ = fs::create_dir_all(&consumer_db_full_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `consumer_db_full_path` [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: comparison to empty slice [INFO] [stdout] --> src/cli/util.rs:156:13 [INFO] [stdout] | [INFO] [stdout] 156 | if !username.eq("") && !password.eq("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `username.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cli/util.rs:156:33 [INFO] [stdout] | [INFO] [stdout] 156 | if !username.eq("") && !password.eq("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `password.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cli/util.rs:194:13 [INFO] [stdout] | [INFO] [stdout] 194 | if !username.eq("") && !database_name.eq("") && access_right != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `username.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cli/util.rs:194:33 [INFO] [stdout] | [INFO] [stdout] 194 | if !username.eq("") && !database_name.eq("") && access_right != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `database_name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/cli/util.rs:205:13 [INFO] [stdout] | [INFO] [stdout] 205 | / let _ = match execute_query( [INFO] [stdout] 206 | | AppliedQuery::new(queries::UPSERT_USER_DATABASE_ACCESS).with_args(&vec![ [INFO] [stdout] 207 | | QueryArg::new(query_arg::Value::String(database_name)), [INFO] [stdout] 208 | | QueryArg::new(query_arg::Value::String(database_name_hash)), [INFO] [stdout] ... | [INFO] [stdout] 223 | | }; [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 205 - let _ = match execute_query( [INFO] [stdout] 205 + match execute_query( [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/cli/util.rs:230:34 [INFO] [stdout] | [INFO] [stdout] 230 | pub fn get_flag_val<'a, T>(args: &'a Vec, flag: &'a str) -> Option [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] 230 - pub fn get_flag_val<'a, T>(args: &'a Vec, flag: &'a str) -> Option [INFO] [stdout] 230 + pub fn get_flag_val<'a, T>(args: &'a [String], flag: &'a str) -> Option [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cli/util.rs:240:9 [INFO] [stdout] | [INFO] [stdout] 240 | / if args_flag == flag { [INFO] [stdout] 241 | | if !args_flag_val.starts_with("-") { [INFO] [stdout] 242 | | if let Ok(parsed_val) = args_flag_val.parse::() { [INFO] [stdout] 243 | | res = Some(parsed_val); [INFO] [stdout] ... | [INFO] [stdout] 249 | | }; [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] 240 ~ if args_flag == flag [INFO] [stdout] 241 ~ && !args_flag_val.starts_with("-") { [INFO] [stdout] 242 | if let Ok(parsed_val) = args_flag_val.parse::() { [INFO] [stdout] ... [INFO] [stdout] 247 | } [INFO] [stdout] 248 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'guard [INFO] [stdout] --> src/core/state.rs:45:33 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn insert_db_connection<'guard>( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | guard: &'guard impl Guard, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 45 ~ pub fn insert_db_connection( [INFO] [stdout] 46 | &self, [INFO] [stdout] 47 | db_name: &str, [INFO] [stdout] 48 | db_connection: SqlitePool, [INFO] [stdout] 49 ~ guard: &impl Guard, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/core/util.rs:73:47 [INFO] [stdout] | [INFO] [stdout] 73 | data.insert_db_connection(&db_name, conn, db_connections_guard); [INFO] [stdout] | ^^^^^^^^ help: change this to: `db_name` [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: length comparison to zero [INFO] [stdout] --> src/core/util.rs:100:8 [INFO] [stdout] | [INFO] [stdout] 100 | if app_state_users_pin.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!app_state_users_pin.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/web/controller/database.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | &db, [INFO] [stdout] | ^^^ help: change this to: `db` [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/web/controller/database.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 151 | &db, [INFO] [stdout] | ^^^ help: change this to: `db` [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: called `unwrap` on `self.data` after checking its variant with `is_some` [INFO] [stdout] --> src/web/proto.rs:144:46 [INFO] [stdout] | [INFO] [stdout] 133 | if self.data.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = self.data` [INFO] [stdout] ... [INFO] [stdout] 144 | let claims = generate_claims(self.data.unwrap(), self.subject.unwrap(), iat, exp); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/web/proto.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | / let mut buf = Vec::new(); [INFO] [stdout] 157 | | buf.reserve(request.encoded_len()); [INFO] [stdout] | |___________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut buf = Vec::with_capacity(request.encoded_len());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` 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/web/proto.rs:328:56 [INFO] [stdout] | [INFO] [stdout] 328 | let mut mac = match Hmac::::new_from_slice(&secret) { [INFO] [stdout] | ^^^^^^^ help: change this to: `secret` [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/web/proto.rs:333:16 [INFO] [stdout] | [INFO] [stdout] 333 | mac.update(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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 can be simplified using the `async fn` syntax [INFO] [stdout] --> src/web/util.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | / fn handle_fetch( [INFO] [stdout] 73 | | &self, [INFO] [stdout] 74 | | request_query: &QueryRequest, [INFO] [stdout] 75 | | ) -> impl Future> + Send { [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn [INFO] [stdout] = note: `#[warn(clippy::manual_async_fn)]` 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/web/util.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | &self.db, [INFO] [stdout] | ^^^^^^^^ help: change this to: `self.db` [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 can be simplified using the `async fn` syntax [INFO] [stdout] --> src/web/util.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | / fn handle_mutate( [INFO] [stdout] 100 | | &self, [INFO] [stdout] 101 | | request_query: &QueryRequest, [INFO] [stdout] 102 | | ) -> impl Future> + Send { [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function can be simplified using the `async fn` syntax [INFO] [stdout] --> src/web/util.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 136 | / fn handle_migrate( [INFO] [stdout] 137 | | &self, [INFO] [stdout] 138 | | migration: &MigrationRequest, [INFO] [stdout] 139 | | ) -> impl Future> + Send { [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/web/util.rs:201:39 [INFO] [stdout] | [INFO] [stdout] 201 | pub async fn get_proto_package_result<'a, T>( [INFO] [stdout] | ^^ [INFO] [stdout] 202 | claims: Claims, [INFO] [stdout] 203 | handler: &'a T, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/web/util.rs:240:24 [INFO] [stdout] | [INFO] [stdout] 240 | pub fn extract_headers<'a>(headers: &'a HeaderMap) -> Result<(&'a str, &'a str, &'a str), Error> { [INFO] [stdout] | ^^ ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 240 - pub fn extract_headers<'a>(headers: &'a HeaderMap) -> Result<(&'a str, &'a str, &'a str), Error> { [INFO] [stdout] 240 + pub fn extract_headers(headers: &HeaderMap) -> Result<(&str, &str, &str), Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/tests/core.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | assert!(true); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/tests/core.rs:230:9 [INFO] [stdout] | [INFO] [stdout] 230 | assert!(true); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/tests/web.rs:557:9 [INFO] [stdout] | [INFO] [stdout] 557 | / let mut buf = Vec::new(); [INFO] [stdout] 558 | | buf.reserve(request.encoded_len()); [INFO] [stdout] | |___________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut buf = Vec::with_capacity(request.encoded_len());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests/web.rs:569:29 [INFO] [stdout] | [INFO] [stdout] 569 | .with_signature(&signature) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `signature` [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: call to `reserve` immediately after creation [INFO] [stdout] --> src/tests/web.rs:602:9 [INFO] [stdout] | [INFO] [stdout] 602 | / let mut buf = Vec::new(); [INFO] [stdout] 603 | | buf.reserve(request.encoded_len()); [INFO] [stdout] | |___________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut buf = Vec::with_capacity(request.encoded_len());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests/web.rs:614:29 [INFO] [stdout] | [INFO] [stdout] 614 | .with_signature(&signature) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `signature` [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: call to `reserve` immediately after creation [INFO] [stdout] --> src/tests/web.rs:644:9 [INFO] [stdout] | [INFO] [stdout] 644 | / let mut buf = Vec::new(); [INFO] [stdout] 645 | | buf.reserve(request.encoded_len()); [INFO] [stdout] | |___________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut buf = Vec::with_capacity(request.encoded_len());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests/web.rs:656:29 [INFO] [stdout] | [INFO] [stdout] 656 | .with_signature(&signature) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `signature` [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: call to `reserve` immediately after creation [INFO] [stdout] --> src/tests/web.rs:689:9 [INFO] [stdout] | [INFO] [stdout] 689 | / let mut buf = Vec::new(); [INFO] [stdout] 690 | | buf.reserve(request.encoded_len()); [INFO] [stdout] | |___________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut buf = Vec::with_capacity(request.encoded_len());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests/web.rs:701:29 [INFO] [stdout] | [INFO] [stdout] 701 | .with_signature(&signature) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `signature` [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: call to `reserve` immediately after creation [INFO] [stdout] --> src/tests/web.rs:722:9 [INFO] [stdout] | [INFO] [stdout] 722 | / let mut buf = Vec::new(); [INFO] [stdout] 723 | | buf.reserve(request.encoded_len()); [INFO] [stdout] | |___________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut buf = Vec::with_capacity(request.encoded_len());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tests/web.rs:735:29 [INFO] [stdout] | [INFO] [stdout] 735 | .with_signature(&signature) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `signature` [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: useless use of `vec!` [INFO] [stdout] --> src/cli/util.rs:168:67 [INFO] [stdout] | [INFO] [stdout] 168 | AppliedQuery::new(queries::INSERT_USER).with_args(&vec![ [INFO] [stdout] | ___________________________________________________________________^ [INFO] [stdout] 169 | | QueryArg::new(query_arg::Value::String(username)), [INFO] [stdout] 170 | | QueryArg::new(query_arg::Value::String(username_hash)), [INFO] [stdout] 171 | | QueryArg::new(query_arg::Value::String(username_password_hash)), [INFO] [stdout] 172 | | ]), [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] 168 ~ AppliedQuery::new(queries::INSERT_USER).with_args(&[QueryArg::new(query_arg::Value::String(username)), [INFO] [stdout] 169 + QueryArg::new(query_arg::Value::String(username_hash)), [INFO] [stdout] 170 ~ QueryArg::new(query_arg::Value::String(username_password_hash))]), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/cli/util.rs:206:83 [INFO] [stdout] | [INFO] [stdout] 206 | AppliedQuery::new(queries::UPSERT_USER_DATABASE_ACCESS).with_args(&vec![ [INFO] [stdout] | ___________________________________________________________________________________^ [INFO] [stdout] 207 | | QueryArg::new(query_arg::Value::String(database_name)), [INFO] [stdout] 208 | | QueryArg::new(query_arg::Value::String(database_name_hash)), [INFO] [stdout] 209 | | QueryArg::new(query_arg::Value::Int(access_right as i64)), [INFO] [stdout] 210 | | QueryArg::new(query_arg::Value::String(username_hash)), [INFO] [stdout] 211 | | ]), [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] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 206 ~ AppliedQuery::new(queries::UPSERT_USER_DATABASE_ACCESS).with_args(&[QueryArg::new(query_arg::Value::String(database_name)), [INFO] [stdout] 207 + QueryArg::new(query_arg::Value::String(database_name_hash)), [INFO] [stdout] 208 + QueryArg::new(query_arg::Value::Int(access_right as i64)), [INFO] [stdout] 209 ~ QueryArg::new(query_arg::Value::String(username_hash))]), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/web/util.rs:153:84 [INFO] [stdout] | [INFO] [stdout] 153 | ... AppliedQuery::new(queries::INSERT_MIGRATION).with_args(&vec![ [INFO] [stdout] | ______________________________________________________________________________^ [INFO] [stdout] 154 | | ... QueryArg::new(query_arg::Value::String(migration.name.clone())), [INFO] [stdout] 155 | | ... QueryArg::new(query_arg::Value::String(migration.query.clone())), [INFO] [stdout] 156 | | ... ]), [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] help: you can use a slice directly [INFO] [stdout] | [INFO] [stdout] 153 ~ AppliedQuery::new(queries::INSERT_MIGRATION).with_args(&[QueryArg::new(query_arg::Value::String(migration.name.clone())), [INFO] [stdout] 154 ~ QueryArg::new(query_arg::Value::String(migration.query.clone()))]), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 27s [INFO] running `Command { std: "docker" "inspect" "03039e52f779e43d5ba03dd696c1f9f33ce021600df1b752e3ccb65ae727f2a1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "03039e52f779e43d5ba03dd696c1f9f33ce021600df1b752e3ccb65ae727f2a1", kill_on_drop: false }` [INFO] [stdout] 03039e52f779e43d5ba03dd696c1f9f33ce021600df1b752e3ccb65ae727f2a1