[INFO] cloning repository https://github.com/Deisss/migrate [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Deisss/migrate" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDeisss%2Fmigrate", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDeisss%2Fmigrate'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] dd7ac566a2d0c45f332a688985001da1675c1189 [INFO] linting Deisss/migrate against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDeisss%2Fmigrate" "/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/Deisss/migrate [INFO] finished tweaking git repo https://github.com/Deisss/migrate [INFO] tweaked toml for git repo https://github.com/Deisss/migrate written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Deisss/migrate 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/Deisss/migrate 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 time-macros v0.2.20 [INFO] [stderr] Downloaded slog v2.8.2 [INFO] [stderr] Downloaded windows-link v0.1.0 [INFO] [stderr] Downloaded term v1.2.1 [INFO] [stderr] Downloaded time-core v0.1.3 [INFO] [stderr] Downloaded slog-term v2.9.2 [INFO] [stderr] Downloaded btoi v0.5.0 [INFO] [stderr] Downloaded mysql-common-derive v0.32.0 [INFO] [stderr] Downloaded io-enum v1.2.0 [INFO] [stderr] Downloaded wasite v1.0.2 [INFO] [stderr] Downloaded slog-async v2.8.0 [INFO] [stderr] Downloaded rsqlite-vfs v0.1.0 [INFO] [stderr] Downloaded hashlink v0.11.0 [INFO] [stderr] Downloaded postgres-protocol v0.6.10 [INFO] [stderr] Downloaded twox-hash v2.1.0 [INFO] [stderr] Downloaded uuid v1.15.1 [INFO] [stderr] Downloaded clap v4.5.31 [INFO] [stderr] Downloaded config v0.15.9 [INFO] [stderr] Downloaded tokio-postgres v0.7.16 [INFO] [stderr] Downloaded time v0.3.39 [INFO] [stderr] Downloaded yaml-rust2 v0.10.0 [INFO] [stderr] Downloaded mysql v27.0.0 [INFO] [stderr] Downloaded clap_builder v4.5.31 [INFO] [stderr] Downloaded mysql_common v0.36.2 [INFO] [stderr] Downloaded rusqlite v0.38.0 [INFO] [stderr] Downloaded syn v1.0.76 [INFO] [stderr] Downloaded object v0.24.0 [INFO] [stderr] Downloaded backtrace v0.3.59 [INFO] [stderr] Downloaded postgres v0.19.12 [INFO] [stderr] Downloaded postgres-types v0.2.12 [INFO] [stderr] Downloaded objc2-system-configuration v0.3.2 [INFO] [stderr] Downloaded addr2line v0.15.2 [INFO] [stderr] Downloaded postgres-native-tls v0.5.2 [INFO] [stderr] Downloaded whoami v2.1.1 [INFO] [stderr] Downloaded libz-sys v1.0.25 [INFO] [stderr] Downloaded gimli v0.24.0 [INFO] [stderr] Downloaded libsqlite3-sys v0.36.0 [INFO] [stderr] Downloaded sqlite-wasm-rs v0.5.2 [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] 02d4b80f7b9efb948514c82e9e5b24bd1f597232fa003b9d37ed94b4e6990690 [INFO] running `Command { std: "docker" "start" "-a" "02d4b80f7b9efb948514c82e9e5b24bd1f597232fa003b9d37ed94b4e6990690", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "02d4b80f7b9efb948514c82e9e5b24bd1f597232fa003b9d37ed94b4e6990690", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "02d4b80f7b9efb948514c82e9e5b24bd1f597232fa003b9d37ed94b4e6990690", kill_on_drop: false }` [INFO] [stdout] 02d4b80f7b9efb948514c82e9e5b24bd1f597232fa003b9d37ed94b4e6990690 [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] 89b21a07da6006e4aa6518cc9f99ec4e44d9b9f9f0bdee001b6c9488d87cee20 [INFO] running `Command { std: "docker" "start" "-a" "89b21a07da6006e4aa6518cc9f99ec4e44d9b9f9f0bdee001b6c9488d87cee20", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.181 [INFO] [stderr] Compiling cc v1.2.55 [INFO] [stderr] Compiling quote v1.0.39 [INFO] [stderr] Compiling generic-array v0.14.4 [INFO] [stderr] Compiling byteorder v1.3.4 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking smallvec v1.6.1 [INFO] [stderr] Compiling getrandom v0.3.1 [INFO] [stderr] Compiling syn v2.0.99 [INFO] [stderr] Checking subtle v2.4.1 [INFO] [stderr] Checking unicode-normalization v0.1.12 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling zerocopy v0.8.23 [INFO] [stderr] Checking foldhash v0.1.4 [INFO] [stderr] Compiling syn v1.0.76 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Compiling rustversion v1.0.20 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Compiling openssl-sys v0.9.106 [INFO] [stderr] Checking sha2 v0.10.8 [INFO] [stderr] Compiling hashbrown v0.15.2 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking socket2 v0.5.8 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Compiling getrandom v0.2.3 [INFO] [stderr] Compiling tiny-keccak v2.0.2 [INFO] [stderr] Compiling ryu v1.0.3 [INFO] [stderr] Compiling indexmap v2.7.1 [INFO] [stderr] Compiling const-random-macro v0.1.16 [INFO] [stderr] Checking tokio v1.43.0 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Compiling libz-sys v1.0.25 [INFO] [stderr] Checking stringprep v0.1.2 [INFO] [stderr] Compiling winnow v0.7.3 [INFO] [stderr] Checking once_cell v1.20.3 [INFO] [stderr] Checking fallible-iterator v0.2.0 [INFO] [stderr] Compiling crc32fast v1.2.0 [INFO] [stderr] Compiling openssl v0.10.71 [INFO] [stderr] Compiling slog v2.8.2 [INFO] [stderr] Checking phf_shared v0.13.1 [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Checking const-random v0.1.18 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking socket2 v0.6.2 [INFO] [stderr] Compiling proc-macro-error-attr2 v2.0.0 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Compiling num-integer v0.1.46 [INFO] [stderr] Checking itoa v0.4.5 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling num-bigint v0.4.6 [INFO] [stderr] Compiling darling_core v0.20.10 [INFO] [stderr] Compiling proc-macro-error2 v2.0.1 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking phf v0.13.1 [INFO] [stderr] Checking dlv-list v0.5.2 [INFO] [stderr] Checking futures-channel v0.3.4 [INFO] [stderr] Checking whoami v2.1.1 [INFO] [stderr] Compiling libsqlite3-sys v0.36.0 [INFO] [stderr] Checking openssl-probe v0.1.2 [INFO] [stderr] Compiling mysql_common v0.36.2 [INFO] [stderr] Checking foldhash v0.2.0 [INFO] [stderr] Compiling time-core v0.1.3 [INFO] [stderr] Checking hashbrown v0.16.1 [INFO] [stderr] Compiling time-macros v0.2.20 [INFO] [stderr] Checking tokio-util v0.7.13 [INFO] [stderr] Checking ordered-multimap v0.7.3 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling async-trait v0.1.24 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling darling_macro v0.20.10 [INFO] [stderr] Checking thread_local v1.0.1 [INFO] [stderr] Compiling darling v0.20.10 [INFO] [stderr] Checking flate2 v1.0.14 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Compiling derive_utils v0.15.0 [INFO] [stderr] Checking hashlink v0.10.0 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Compiling pest v2.7.15 [INFO] [stderr] Checking btoi v0.5.0 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking idna v0.2.0 [INFO] [stderr] Checking saturating v0.1.0 [INFO] [stderr] Compiling mysql v27.0.0 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Compiling slog-async v2.8.0 [INFO] [stderr] Checking uuid v1.15.1 [INFO] [stderr] Checking time v0.3.39 [INFO] [stderr] Checking url v2.1.1 [INFO] [stderr] Checking clap_builder v4.5.31 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.0 [INFO] [stderr] Checking yaml-rust2 v0.10.0 [INFO] [stderr] Compiling pest_meta v2.7.15 [INFO] [stderr] Checking postgres-protocol v0.6.10 [INFO] [stderr] Checking chrono v0.4.40 [INFO] [stderr] Checking rust-ini v0.21.1 [INFO] [stderr] Compiling io-enum v1.2.0 [INFO] [stderr] Checking hashlink v0.11.0 [INFO] [stderr] Checking postgres-types v0.2.12 [INFO] [stderr] Checking crossbeam-queue v0.3.12 [INFO] [stderr] Checking is-terminal v0.4.16 [INFO] [stderr] Checking pem v3.0.5 [INFO] [stderr] Checking twox-hash v2.1.0 [INFO] [stderr] Checking bufstream v0.1.4 [INFO] [stderr] Checking lru v0.16.3 [INFO] [stderr] Compiling pest_generator v2.7.15 [INFO] [stderr] Checking tokio-postgres v0.7.16 [INFO] [stderr] Checking term v1.2.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking take_mut v0.2.2 [INFO] [stderr] Checking console v0.16.2 [INFO] [stderr] Checking clap v4.5.31 [INFO] [stderr] Checking md5 v0.8.0 [INFO] [stderr] Checking bitflags v2.9.0 [INFO] [stderr] Checking erased-serde v0.3.31 [INFO] [stderr] Checking serde_json v1.0.48 [INFO] [stderr] Checking serde_spanned v0.6.8 [INFO] [stderr] Compiling toml_datetime v0.6.8 [INFO] [stderr] Compiling pest_derive v2.7.15 [INFO] [stderr] Checking toml_edit v0.22.24 [INFO] [stderr] Checking json5 v0.4.1 [INFO] [stderr] Checking ron v0.8.1 [INFO] [stderr] Checking slog-term v2.9.2 [INFO] [stderr] Checking postgres v0.19.12 [INFO] [stderr] Checking toml v0.8.20 [INFO] [stderr] Checking config v0.15.9 [INFO] [stderr] Compiling proc-macro-crate v3.3.0 [INFO] [stderr] Compiling mysql-common-derive v0.32.0 [INFO] [stderr] Checking tokio-native-tls v0.3.0 [INFO] [stderr] Checking postgres-native-tls v0.5.2 [INFO] [stderr] Checking rusqlite v0.38.0 [INFO] [stderr] Checking migrate v0.1.6 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/engines/postgresql.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use md5; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/engines/sqlite.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | use md5; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/engines/postgresql.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use md5; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/engines/sqlite.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | use md5; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `interactive` is never read [INFO] [stdout] --> src/main.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 65 | pub struct Configuration { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 77 | interactive: bool, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Configuration` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/filesystem.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | file_stem = match it.next() { [INFO] [stdout] | _____________________^ [INFO] [stdout] 74 | | Some(s) => s, [INFO] [stdout] 75 | | None => return None [INFO] [stdout] 76 | | }; [INFO] [stdout] | |_________^ help: try instead: `it.next()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `tmp` after checking its variant with `is_some` [INFO] [stdout] --> src/filesystem.rs:140:39 [INFO] [stdout] | [INFO] [stdout] 139 | if tmp.is_some() { [INFO] [stdout] | ---------------- help: try: `if let Some() = tmp` [INFO] [stdout] 140 | let tmp = tmp.unwrap(); [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: length comparison to zero [INFO] [stdout] --> src/filesystem.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 110 | if root.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `root.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/filesystem.rs:118:9 [INFO] [stdout] | [INFO] [stdout] 118 | test.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `test.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/filesystem.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | let restrict: u64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `restrict` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 125 ~ [INFO] [stdout] 126 ~ let restrict: u64 = match filter { [INFO] [stdout] 127 ~ Some(s) => s.parse::().unwrap_or(0), [INFO] [stdout] 128 ~ _ => 0 [INFO] [stdout] 129 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/filesystem.rs:149:29 [INFO] [stdout] | [INFO] [stdout] 149 | / ... match filename { [INFO] [stdout] 150 | | ... Ok(s) => slog::warn!(logger, "Failed to get file: {}", s), [INFO] [stdout] 151 | | ... _ => {} [INFO] [stdout] 152 | | ... } [INFO] [stdout] | |_______________________^ help: try: `if let Ok(s) = filename { slog::warn!(logger, "Failed to get file: {}", s) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `pos_down` after checking its variant with `is_some` [INFO] [stdout] --> src/filesystem.rs:181:32 [INFO] [stdout] | [INFO] [stdout] 180 | if pos_down.is_some() { [INFO] [stdout] | --------------------- help: try: `if let Some() = pos_down` [INFO] [stdout] 181 | let pos_down = pos_down.unwrap(); [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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `pos_up` after checking its variant with `is_some` [INFO] [stdout] --> src/filesystem.rs:193:30 [INFO] [stdout] | [INFO] [stdout] 192 | if pos_up.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = pos_up` [INFO] [stdout] 193 | let pos_up = pos_up.unwrap(); [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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `pos_down` after checking its variant with `is_some` [INFO] [stdout] --> src/filesystem.rs:199:40 [INFO] [stdout] | [INFO] [stdout] 198 | if pos_down.is_some() { [INFO] [stdout] | --------------------- help: try: `if let Some() = pos_down` [INFO] [stdout] 199 | let pos_down = pos_down.unwrap(); [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] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/filesystem.rs:238:39 [INFO] [stdout] | [INFO] [stdout] 238 | let mut s = String::with_capacity(size.abs() as usize); [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `size.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/filesystem.rs:251:29 [INFO] [stdout] | [INFO] [stdout] 251 | return String::from(&s[1..]); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/filesystem.rs:250:5 [INFO] [stdout] | [INFO] [stdout] 250 | if s.starts_with("/") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 250 ~ if let Some() = s.strip_prefix("/") { [INFO] [stdout] 251 ~ return String::from(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NONE` contains a capitalized acronym [INFO] [stdout] --> src/commands/interactive.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | NONE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `None` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DOWN` contains a capitalized acronym [INFO] [stdout] --> src/commands/interactive.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | DOWN, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Down` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `REDO` contains a capitalized acronym [INFO] [stdout] --> src/commands/interactive.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | REDO [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Redo` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/commands/interactive.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | / impl Default for InteractionType { [INFO] [stdout] 27 | | fn default() -> Self { InteractionType::NONE } [INFO] [stdout] 28 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 19 + #[derive(Default)] [INFO] [stdout] 20 | pub enum InteractionType { [INFO] [stdout] 21 ~ #[default] [INFO] [stdout] 22 ~ NONE, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/commands/interactive.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | result.current_type = InteractionType::UP; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `commands::interactive::InteractiveMigration { current_type: InteractionType::UP, number: String::from(migration), migration: Some(String::from(migration)), migration_hash: Some(String::from(hash)), migration_origin: Some(String::from(origin)), file_up: None, file_down: None, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/commands/interactive.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | let mut result: InteractiveMigration = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/commands/interactive.rs:116:12 [INFO] [stdout] | [INFO] [stdout] 116 | if found == false && file.is_up == true { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `!found` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:116:30 [INFO] [stdout] | [INFO] [stdout] 116 | if found == false && file.is_up == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `file.is_up` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/interactive.rs:117:54 [INFO] [stdout] | [INFO] [stdout] 117 | results.push(convert_file_to_interactive(&file)); [INFO] [stdout] | ^^^^^ help: change this to: `file` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:127:20 [INFO] [stdout] | [INFO] [stdout] 127 | if file.is_down == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `file.is_down` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 130 | if file.is_up == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `file.is_up` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `migration.file_up` after checking its variant with `is_some` [INFO] [stdout] --> src/commands/interactive.rs:236:25 [INFO] [stdout] | [INFO] [stdout] 235 | if migration.file_up.is_some() { [INFO] [stdout] | ------------------------------ help: try: `if let Some() = &migration.file_up` [INFO] [stdout] 236 | let f = migration.file_up.as_ref().unwrap(); [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/commands/interactive.rs:162:52 [INFO] [stdout] | [INFO] [stdout] 162 | fn print_menu(term: &Term, root: &str, migrations: &Vec, selected: usize, logger: &slog::Logger) -> std::io::... [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] 162 - fn print_menu(term: &Term, root: &str, migrations: &Vec, selected: usize, logger: &slog::Logger) -> std::io::Result> { [INFO] [stdout] 162 + fn print_menu(term: &Term, root: &str, migrations: &[InteractiveMigration], selected: usize, logger: &slog::Logger) -> std::io::Result> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commands/interactive.rs:225:13 [INFO] [stdout] | [INFO] [stdout] 225 | content.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `content.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/commands/interactive.rs:291:35 [INFO] [stdout] | [INFO] [stdout] 291 | fn clear_menu(term: &Term, sizes: &mut Vec) -> std::io::Result<()> { [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] 291 - fn clear_menu(term: &Term, sizes: &mut Vec) -> std::io::Result<()> { [INFO] [stdout] 291 + fn clear_menu(term: &Term, sizes: &mut [usize]) -> std::io::Result<()> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/interactive.rs:320:37 [INFO] [stdout] | [INFO] [stdout] 320 | let r = print_menu(&term, root, &migrations, position, logger); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `migrations` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:327:12 [INFO] [stdout] | [INFO] [stdout] 327 | if rerender == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `rerender` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/interactive.rs:333:45 [INFO] [stdout] | [INFO] [stdout] 333 | let r = print_menu(&term, root, &migrations, position, logger); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `migrations` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/commands/interactive.rs:380:17 [INFO] [stdout] | [INFO] [stdout] 380 | / if position > 0 { [INFO] [stdout] 381 | | position = position - 1; [INFO] [stdout] 382 | | rerender = true; [INFO] [stdout] 383 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 379 ~ Key::ArrowUp [INFO] [stdout] 380 ~ if position > 0 => { [INFO] [stdout] 381 | position = position - 1; [INFO] [stdout] 382 | rerender = true; [INFO] [stdout] 383 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/commands/interactive.rs:386:17 [INFO] [stdout] | [INFO] [stdout] 386 | / if position < migrations.len() + 1 { [INFO] [stdout] 387 | | position += 1; [INFO] [stdout] 388 | | rerender = true; [INFO] [stdout] 389 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 385 ~ Key::ArrowDown [INFO] [stdout] 386 ~ if position < migrations.len() + 1 => { [INFO] [stdout] 387 | position += 1; [INFO] [stdout] 388 | rerender = true; [INFO] [stdout] 389 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/commands/interactive.rs:381:21 [INFO] [stdout] | [INFO] [stdout] 381 | position = position - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `position -= 1` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:408:16 [INFO] [stdout] | [INFO] [stdout] 408 | if first == true { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `first` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/commands/interactive.rs:419:21 [INFO] [stdout] | [INFO] [stdout] 419 | let s = format!("{}", file_name); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `file_name.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: empty string literal in `println!` [INFO] [stdout] --> src/commands/interactive.rs:423:5 [INFO] [stdout] | [INFO] [stdout] 423 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/interactive.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | !res.is_err() && (s == "Y" || s == "y" || s == "") [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `res.is_ok()` [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: comparison to empty slice [INFO] [stdout] --> src/commands/interactive.rs:442:47 [INFO] [stdout] | [INFO] [stdout] 442 | !res.is_err() && (s == "Y" || s == "y" || s == "") [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands/interactive.rs:459:5 [INFO] [stdout] | [INFO] [stdout] 459 | / match db.create_migration_table() { [INFO] [stdout] 460 | | Err(e) => { [INFO] [stdout] 461 | | slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 462 | | }, [INFO] [stdout] 463 | | _ => {} [INFO] [stdout] 464 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 459 ~ if let Err(e) = db.create_migration_table() { [INFO] [stdout] 460 + slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 461 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/interactive.rs:504:16 [INFO] [stdout] | [INFO] [stdout] 504 | if migration_down.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!migration_down.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/interactive.rs:509:16 [INFO] [stdout] | [INFO] [stdout] 509 | if migration_up.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!migration_up.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] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:528:8 [INFO] [stdout] | [INFO] [stdout] 528 | if configuration.debug == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/interactive.rs:538:13 [INFO] [stdout] | [INFO] [stdout] 538 | / match process_interactive_sql(configuration, &mut files, logger) { [INFO] [stdout] 539 | | Err(_e) => false, [INFO] [stdout] 540 | | _ => true [INFO] [stdout] 541 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 538 - match process_interactive_sql(configuration, &mut files, logger) { [INFO] [stdout] 539 - Err(_e) => false, [INFO] [stdout] 540 - _ => true [INFO] [stdout] 541 - } [INFO] [stdout] 538 + !matches!(process_interactive_sql(configuration, &mut files, logger), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands/down.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / match db.create_migration_table() { [INFO] [stdout] 28 | | Err(e) => { [INFO] [stdout] 29 | | slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 30 | | return Err(Box::new(EngineError {})); [INFO] [stdout] 31 | | }, [INFO] [stdout] 32 | | _ => {} [INFO] [stdout] 33 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 27 ~ if let Err(e) = db.create_migration_table() { [INFO] [stdout] 28 + slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 29 + return Err(Box::new(EngineError {})); [INFO] [stdout] 30 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/down.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | if configuration.debug == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/down.rs:53:29 [INFO] [stdout] | [INFO] [stdout] 53 | debug_configuration(&configuration, "Files to be reverted:", "Nothing to revert", &files, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/down.rs:53:91 [INFO] [stdout] | [INFO] [stdout] 53 | debug_configuration(&configuration, "Files to be reverted:", "Nothing to revert", &files, logger); [INFO] [stdout] | ^^^^^^ help: change this to: `files` [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/commands/down.rs:63:41 [INFO] [stdout] | [INFO] [stdout] 63 | let error: bool = match get_sql(&file, 0) { [INFO] [stdout] | ^^^^^ help: change this to: `file` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/down.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | / match db.rollback(&file.origin, &file.number.to_string(), &sql, skip_transaction(&configuration, &sql)) { [INFO] [stdout] 66 | | Err(_e) => true, [INFO] [stdout] 67 | | _ => false [INFO] [stdout] 68 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 65 - match db.rollback(&file.origin, &file.number.to_string(), &sql, skip_transaction(&configuration, &sql)) { [INFO] [stdout] 66 - Err(_e) => true, [INFO] [stdout] 67 - _ => false [INFO] [stdout] 68 - } [INFO] [stdout] 65 + matches!(db.rollback(&file.origin, &file.number.to_string(), &sql, skip_transaction(&configuration, &sql)), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/down.rs:65:98 [INFO] [stdout] | [INFO] [stdout] 65 | match db.rollback(&file.origin, &file.number.to_string(), &sql, skip_transaction(&configuration, &sql)) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/commands/down.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | if error && configuration.continue_on_error == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!configuration.continue_on_error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/down.rs:105:8 [INFO] [stdout] | [INFO] [stdout] 105 | if files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `files.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/down.rs:111:8 [INFO] [stdout] | [INFO] [stdout] 111 | if configuration.version.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.version.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] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/down.rs:128:17 [INFO] [stdout] | [INFO] [stdout] 128 | / match process_down_sql(configuration, &mut files, logger) { [INFO] [stdout] 129 | | Err(_e) => false, [INFO] [stdout] 130 | | _ => true [INFO] [stdout] 131 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 128 - match process_down_sql(configuration, &mut files, logger) { [INFO] [stdout] 129 - Err(_e) => false, [INFO] [stdout] 130 - _ => true [INFO] [stdout] 131 - } [INFO] [stdout] 128 + !matches!(process_down_sql(configuration, &mut files, logger), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands/up.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / match db.create_migration_table() { [INFO] [stdout] 25 | | Err(e) => { [INFO] [stdout] 26 | | slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 27 | | }, [INFO] [stdout] 28 | | _ => {} [INFO] [stdout] 29 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 24 ~ if let Err(e) = db.create_migration_table() { [INFO] [stdout] 25 + slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 26 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/up.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | if configuration.debug == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/up.rs:46:29 [INFO] [stdout] | [INFO] [stdout] 46 | debug_configuration(&configuration, "Files to be migrated:", "Nothing to migrate", &files, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/up.rs:46:92 [INFO] [stdout] | [INFO] [stdout] 46 | debug_configuration(&configuration, "Files to be migrated:", "Nothing to migrate", &files, logger); [INFO] [stdout] | ^^^^^^ help: change this to: `files` [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/commands/up.rs:55:41 [INFO] [stdout] | [INFO] [stdout] 55 | let error: bool = match get_sql(&file, 1) { [INFO] [stdout] | ^^^^^ help: change this to: `file` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/up.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | / ... match db.migrate(&file.origin, &file.number.to_string(), &configuration.migration_type, &sql, skip_transaction(&configuratio... [INFO] [stdout] 58 | | ... Err(_e) => true, [INFO] [stdout] 59 | | ... _ => false [INFO] [stdout] 60 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 57 - match db.migrate(&file.origin, &file.number.to_string(), &configuration.migration_type, &sql, skip_transaction(&configuration, &sql)) { [INFO] [stdout] 58 - Err(_e) => true, [INFO] [stdout] 59 - _ => false [INFO] [stdout] 60 - } [INFO] [stdout] 57 + matches!(db.migrate(&file.origin, &file.number.to_string(), &configuration.migration_type, &sql, skip_transaction(&configuration, &sql)), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/up.rs:57:128 [INFO] [stdout] | [INFO] [stdout] 57 | ...igration_type, &sql, skip_transaction(&configuration, &sql)) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/commands/up.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | if error && configuration.continue_on_error == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!configuration.continue_on_error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/up.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | if files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `files.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/up.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | if configuration.version.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.version.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] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/up.rs:119:17 [INFO] [stdout] | [INFO] [stdout] 119 | / match process_up_sql(configuration, &mut files, logger) { [INFO] [stdout] 120 | | Err(_e) => false, [INFO] [stdout] 121 | | _ => true [INFO] [stdout] 122 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 119 - match process_up_sql(configuration, &mut files, logger) { [INFO] [stdout] 120 - Err(_e) => false, [INFO] [stdout] 121 - _ => true [INFO] [stdout] 122 - } [INFO] [stdout] 119 + !matches!(process_up_sql(configuration, &mut files, logger), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/create.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | !res.is_err() && (s == "Y" || s == "y" || s == "") [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `res.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | if configuration.debug == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/commands/create.rs:52:47 [INFO] [stdout] | [INFO] [stdout] 52 | !res.is_err() && (s == "Y" || s == "y" || s == "") [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands/create.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | / match write!(file, "{}", content) { [INFO] [stdout] 100 | | Err(e) => slog::crit!(logger, "Could not write to file: {}", e), [INFO] [stdout] 101 | | _ => {} [INFO] [stdout] 102 | | } [INFO] [stdout] | |_____________^ help: try: `if let Err(e) = write!(file, "{}", content) { slog::crit!(logger, "Could not write to file: {}", e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:432:16 [INFO] [stdout] | [INFO] [stdout] 432 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:446:16 [INFO] [stdout] | [INFO] [stdout] 446 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:460:16 [INFO] [stdout] | [INFO] [stdout] 460 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:460:40 [INFO] [stdout] | [INFO] [stdout] 460 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!column_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:465:24 [INFO] [stdout] | [INFO] [stdout] 465 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:477:16 [INFO] [stdout] | [INFO] [stdout] 477 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:477:40 [INFO] [stdout] | [INFO] [stdout] 477 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!column_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:480:24 [INFO] [stdout] | [INFO] [stdout] 480 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:494:16 [INFO] [stdout] | [INFO] [stdout] 494 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:494:40 [INFO] [stdout] | [INFO] [stdout] 494 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!column_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:508:16 [INFO] [stdout] | [INFO] [stdout] 508 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:508:40 [INFO] [stdout] | [INFO] [stdout] 508 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!column_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:522:16 [INFO] [stdout] | [INFO] [stdout] 522 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:536:16 [INFO] [stdout] | [INFO] [stdout] 536 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:550:16 [INFO] [stdout] | [INFO] [stdout] 550 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:564:16 [INFO] [stdout] | [INFO] [stdout] 564 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:578:16 [INFO] [stdout] | [INFO] [stdout] 578 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:592:16 [INFO] [stdout] | [INFO] [stdout] 592 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:606:16 [INFO] [stdout] | [INFO] [stdout] 606 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:620:16 [INFO] [stdout] | [INFO] [stdout] 620 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:634:16 [INFO] [stdout] | [INFO] [stdout] 634 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:648:16 [INFO] [stdout] | [INFO] [stdout] 648 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:662:16 [INFO] [stdout] | [INFO] [stdout] 662 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:676:16 [INFO] [stdout] | [INFO] [stdout] 676 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:690:16 [INFO] [stdout] | [INFO] [stdout] 690 | if trigger_name.len() > 0 && table_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!trigger_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:690:42 [INFO] [stdout] | [INFO] [stdout] 690 | if trigger_name.len() > 0 && table_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:695:24 [INFO] [stdout] | [INFO] [stdout] 695 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:707:16 [INFO] [stdout] | [INFO] [stdout] 707 | if trigger_name.len() > 0 && table_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!trigger_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:707:42 [INFO] [stdout] | [INFO] [stdout] 707 | if trigger_name.len() > 0 && table_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:710:24 [INFO] [stdout] | [INFO] [stdout] 710 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:738:35 [INFO] [stdout] | [INFO] [stdout] 738 | let up_sample = get_sample(0, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:739:37 [INFO] [stdout] | [INFO] [stdout] 739 | let down_sample = get_sample(1, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:792:16 [INFO] [stdout] | [INFO] [stdout] 792 | if configuration.debug == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:797:66 [INFO] [stdout] | [INFO] [stdout] 797 | create_file(&full_filename, &get_file_content(0, &configuration, logger), logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/create.rs:801:54 [INFO] [stdout] | [INFO] [stdout] 801 | let full_folder = Path::new(folder).join(&[&now, "_", &configuration.create_name].join("")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[&now, "_", &configuration.create_name].join("")` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:810:16 [INFO] [stdout] | [INFO] [stdout] 810 | if create_folder(&configuration, &full_folder_str, logger) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `create_folder(&configuration, &full_folder_str, logger)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:810:30 [INFO] [stdout] | [INFO] [stdout] 810 | if create_folder(&configuration, &full_folder_str, logger) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:822:77 [INFO] [stdout] | [INFO] [stdout] 822 | create_file(&full_filename_up, &get_file_content(1, &configuration, logger), logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:823:79 [INFO] [stdout] | [INFO] [stdout] 823 | create_file(&full_filename_down, &get_file_content(2, &configuration, logger), logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/create.rs:829:59 [INFO] [stdout] | [INFO] [stdout] 829 | let full_filename_up = Path::new(folder).join(&[&now, "_", &configuration.create_name, ".up.sql"].join("")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[&now, "_", &configuration.create_name, ".up.sql"].join("")` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/create.rs:830:61 [INFO] [stdout] | [INFO] [stdout] 830 | let full_filename_down = Path::new(folder).join(&[&now, "_", &configuration.create_name, ".down.sql"].join("")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[&now, "_", &configuration.create_name, ".down.sql"].join("")` [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/commands/create.rs:840:73 [INFO] [stdout] | [INFO] [stdout] 840 | create_file(&full_filename_up, &get_file_content(1, &configuration, logger), logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:841:75 [INFO] [stdout] | [INFO] [stdout] 841 | create_file(&full_filename_down, &get_file_content(2, &configuration, logger), logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:857:8 [INFO] [stdout] | [INFO] [stdout] 857 | if Path::new(&migration_folder).exists() == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Path::new(&migration_folder).exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:858:24 [INFO] [stdout] | [INFO] [stdout] 858 | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `migration_folder` [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/commands/create.rs:858:43 [INFO] [stdout] | [INFO] [stdout] 858 | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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 `if` statement can be collapsed [INFO] [stdout] --> src/commands/create.rs:859:12 [INFO] [stdout] | [INFO] [stdout] 859 | } else if ask_for_new_folder(&configuration, &migration_folder) == true { [INFO] [stdout] | ____________^ [INFO] [stdout] 860 | | if create_folder(&configuration, &migration_folder, logger) == true { [INFO] [stdout] 861 | | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] 862 | | } [INFO] [stdout] 863 | | } [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] 859 ~ } else if ask_for_new_folder(&configuration, &migration_folder) == true [INFO] [stdout] 860 ~ && create_folder(&configuration, &migration_folder, logger) == true { [INFO] [stdout] 861 | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] 862 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:859:15 [INFO] [stdout] | [INFO] [stdout] 859 | } else if ask_for_new_folder(&configuration, &migration_folder) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ask_for_new_folder(&configuration, &migration_folder)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:859:34 [INFO] [stdout] | [INFO] [stdout] 859 | } else if ask_for_new_folder(&configuration, &migration_folder) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:859:50 [INFO] [stdout] | [INFO] [stdout] 859 | } else if ask_for_new_folder(&configuration, &migration_folder) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `migration_folder` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:860:12 [INFO] [stdout] | [INFO] [stdout] 860 | if create_folder(&configuration, &migration_folder, logger) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `create_folder(&configuration, &migration_folder, logger)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:860:26 [INFO] [stdout] | [INFO] [stdout] 860 | if create_folder(&configuration, &migration_folder, logger) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:860:42 [INFO] [stdout] | [INFO] [stdout] 860 | if create_folder(&configuration, &migration_folder, logger) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `migration_folder` [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/commands/create.rs:861:28 [INFO] [stdout] | [INFO] [stdout] 861 | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `migration_folder` [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/commands/create.rs:861:47 [INFO] [stdout] | [INFO] [stdout] 861 | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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 `migration.file_up` after checking its variant with `is_some` [INFO] [stdout] --> src/commands/status.rs:49:25 [INFO] [stdout] | [INFO] [stdout] 48 | if migration.file_up.is_some() { [INFO] [stdout] | ------------------------------ help: try: `if let Some() = &migration.file_up` [INFO] [stdout] 49 | let f = migration.file_up.as_ref().unwrap(); [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/commands/status.rs:16:40 [INFO] [stdout] | [INFO] [stdout] 16 | fn show_status(root: &str, migrations: &mut 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] 16 - fn show_status(root: &str, migrations: &mut Vec) { [INFO] [stdout] 16 + fn show_status(root: &str, migrations: &mut [InteractiveMigration]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/commands/status.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/commands/status.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/status.rs:120:13 [INFO] [stdout] | [INFO] [stdout] 120 | / match process_status_sql(configuration, &mut files, logger) { [INFO] [stdout] 121 | | Err(_e) => false, [INFO] [stdout] 122 | | _ => true [INFO] [stdout] 123 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 120 - match process_status_sql(configuration, &mut files, logger) { [INFO] [stdout] 121 - Err(_e) => false, [INFO] [stdout] 122 - _ => true [INFO] [stdout] 123 - } [INFO] [stdout] 120 + !matches!(process_status_sql(configuration, &mut files, logger), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if configuration.url.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.url.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | if files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `files.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if nothing.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!nothing.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] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engines/postgresql.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | str_error = (&str_error[1..len]).to_owned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `str_error[1..len]` [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: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/engines/postgresql.rs:48:71 [INFO] [stdout] | [INFO] [stdout] 48 | ... let debug = format!("{}^ {}: {}", std::iter::repeat(" ").take(spaces_trimmed).collect::(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `" ".repeat(spaces_trimmed)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] = note: `#[warn(clippy::manual_str_repeat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/engines/postgresql.rs:48:71 [INFO] [stdout] | [INFO] [stdout] 48 | ... let debug = format!("{}^ {}: {}", std::iter::repeat(" ").take(spaces_trimmed).collect::(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(" ", spaces_trimmed)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/engines/postgresql.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | / pub fn new(url: &str, migration_table_name: &str, logger: &slog::Logger) -> Result, Box> { [INFO] [stdout] 93 | | let config = match Config::from_str(url) { [INFO] [stdout] 94 | | Ok(c) => c, [INFO] [stdout] 95 | | Err(e) => { [INFO] [stdout] ... | [INFO] [stdout] 141 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] = note: `#[warn(clippy::new_ret_no_self)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/postgresql.rs:183:65 [INFO] [stdout] | [INFO] [stdout] 183 | let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/postgresql.rs:208:73 [INFO] [stdout] | [INFO] [stdout] 208 | ... let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: methods called `new` usually return `Self` [INFO] [stdout] --> src/engines/sqlite.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new(url: &str, migration_table_name: &str, logger: &slog::Logger) -> Result, Box> { [INFO] [stdout] 16 | | match Connection::open(url) { [INFO] [stdout] 17 | | Ok(connection) => { [INFO] [stdout] 18 | | Ok(Box::new(Sqlite { [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `tmp` after checking its variant with `is_ok` [INFO] [stdout] --> src/engines/sqlite.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 47 | if tmp.is_ok() { [INFO] [stdout] | -------------- help: try: `if let Ok() = tmp` [INFO] [stdout] 48 | results.push(tmp.unwrap()); [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:59:32 [INFO] [stdout] | [INFO] [stdout] 59 | let _ = stmt.query_map(&[&migration_type], |row| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `[&migration_type]` [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: called `unwrap` on `migration_name` after checking its variant with `is_ok` [INFO] [stdout] --> src/engines/sqlite.rs:64:31 [INFO] [stdout] | [INFO] [stdout] 63 | if migration_name.is_ok() { [INFO] [stdout] | ------------------------- help: try: `if let Ok() = migration_name` [INFO] [stdout] 64 | results.push((migration_name.unwrap(), migration_hash.unwrap(), migration_file.unwrap())); [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:78:65 [INFO] [stdout] | [INFO] [stdout] 78 | let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:82:68 [INFO] [stdout] | [INFO] [stdout] 82 | match self.client.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[&version, &hash[..], &migration_type, &file_name]` [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/engines/sqlite.rs:82:70 [INFO] [stdout] | [INFO] [stdout] 82 | match self.client.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `version` [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/engines/sqlite.rs:82:91 [INFO] [stdout] | [INFO] [stdout] 82 | match self.client.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `migration_type` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:103:73 [INFO] [stdout] | [INFO] [stdout] 103 | ... let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:107:68 [INFO] [stdout] | [INFO] [stdout] 107 | ... match trx.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[&version, &hash[..], &migration_type, &file_name]` [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/engines/sqlite.rs:107:70 [INFO] [stdout] | [INFO] [stdout] 107 | ... match trx.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `version` [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/engines/sqlite.rs:107:91 [INFO] [stdout] | [INFO] [stdout] 107 | ... match trx.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `migration_type` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:147:65 [INFO] [stdout] | [INFO] [stdout] 147 | match self.client.execute(&del as &str, &[&version]) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[&version]` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:170:65 [INFO] [stdout] | [INFO] [stdout] 170 | ... match trx.execute(&del as &str, &[&version]) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[&version]` [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: methods called `new` usually return `Self` [INFO] [stdout] --> src/engines/mysql.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / pub fn new(url: &str, migration_table_name: &str, logger: &slog::Logger) -> Result, Box> { [INFO] [stdout] 17 | | match Pool::new(url) { [INFO] [stdout] 18 | | Ok(client) => { [INFO] [stdout] 19 | | match client.get_conn() { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engines/mysql.rs:29:25 [INFO] [stdout] | [INFO] [stdout] 29 | return Err(Box::new(e)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - return Err(Box::new(e)); [INFO] [stdout] 29 + Err(Box::new(e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/engines/mysql.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | String::from(migration) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `migration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/mysql.rs:86:65 [INFO] [stdout] | [INFO] [stdout] 86 | let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/mysql.rs:110:73 [INFO] [stdout] | [INFO] [stdout] 110 | ... let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/engines.rs:31:71 [INFO] [stdout] | [INFO] [stdout] 31 | fn get_migrations_with_hashes(&mut self, migration_type: &str) -> Result, Box>; [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: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/engines.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | fn migrate(&mut self, file: &PathBuf, version: &str, migration_type: &str, migration: &str, skip_transaction: bool) -> Result<()... [INFO] [stdout] | ^^^^^^^^ help: change this to: `&Path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/engines.rs:33:34 [INFO] [stdout] | [INFO] [stdout] 33 | fn rollback(&mut self, file: &PathBuf, version: &str, migration: &str, skip_transaction: bool) -> Result<(), Box>; [INFO] [stdout] | ^^^^^^^^ help: change this to: `&Path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | if configuration.url.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.url.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | if configuration.password.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.password.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:77:8 [INFO] [stdout] | [INFO] [stdout] 77 | if configuration.url.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.url.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | if configuration.url.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.url.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:94:8 [INFO] [stdout] | [INFO] [stdout] 94 | if configuration.username.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.username.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:100:8 [INFO] [stdout] | [INFO] [stdout] 100 | if configuration.password.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.password.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | if configuration.database.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.database.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] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/helpers.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | let milliseconds: u128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 27 | milliseconds = internal - 1000 * seconds; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `milliseconds` here [INFO] [stdout] | [INFO] [stdout] 14 ~ [INFO] [stdout] 15 | let seconds: u128; [INFO] [stdout] ... [INFO] [stdout] 26 | seconds = internal / 1000; [INFO] [stdout] 27 ~ let milliseconds: u128 = internal - 1000 * seconds; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/helpers.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | let seconds: u128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 26 | seconds = internal / 1000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `seconds` here [INFO] [stdout] | [INFO] [stdout] 15 ~ [INFO] [stdout] 16 | let minutes: u128; [INFO] [stdout] ... [INFO] [stdout] 25 | //1000 milliseconds in a second [INFO] [stdout] 26 ~ let seconds: u128 = internal / 1000; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/helpers.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | let minutes: u128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 23 | minutes = internal / 60000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `minutes` here [INFO] [stdout] | [INFO] [stdout] 16 ~ [INFO] [stdout] 17 | let hours: u128; [INFO] [stdout] ... [INFO] [stdout] 22 | //60000 milliseconds in a minute [INFO] [stdout] 23 ~ let minutes: u128 = internal / 60000; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/helpers.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | let hours: u128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 20 | hours = internal / 3600000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `hours` here [INFO] [stdout] | [INFO] [stdout] 17 ~ [INFO] [stdout] 18 | [INFO] [stdout] 19 | //3600000 milliseconds in an hour [INFO] [stdout] 20 ~ let hours: u128 = internal / 3600000; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/helpers.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | internal = internal - 3600000 * hours; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `internal -= 3600000 * hours` [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: manual implementation of an assign operation [INFO] [stdout] --> src/helpers.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | internal = internal - 60000 * minutes; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `internal -= 60000 * minutes` [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: length comparison to zero [INFO] [stdout] --> src/helpers.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | if destructive.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!destructive.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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/helpers.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 96 - return None; [INFO] [stdout] 96 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/main.rs:38:1 [INFO] [stdout] | [INFO] [stdout] 38 | / impl Default for CommandName { [INFO] [stdout] 39 | | fn default() -> Self { CommandName::UP } [INFO] [stdout] 40 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 30 + #[derive(Default)] [INFO] [stdout] 31 | pub enum CommandName { [INFO] [stdout] 32 ~ #[default] [INFO] [stdout] 33 ~ UP, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/main.rs:49:1 [INFO] [stdout] | [INFO] [stdout] 49 | / impl Default for EngineName { [INFO] [stdout] 50 | | fn default() -> Self { EngineName::POSTGRESQL } [INFO] [stdout] 51 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 43 + #[derive(Default)] [INFO] [stdout] 44 | pub enum EngineName { [INFO] [stdout] 45 ~ #[default] [INFO] [stdout] 46 ~ POSTGRESQL, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/main.rs:60:1 [INFO] [stdout] | [INFO] [stdout] 60 | / impl Default for CreateType { [INFO] [stdout] 61 | | fn default() -> Self { CreateType::FOLDER } [INFO] [stdout] 62 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 54 + #[derive(Default)] [INFO] [stdout] 55 | pub enum CreateType { [INFO] [stdout] 56 ~ #[default] [INFO] [stdout] 57 ~ FOLDER, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/main.rs:111:5 [INFO] [stdout] | [INFO] [stdout] 111 | / configuration.engine = match settings.get_string("engine") { [INFO] [stdout] 112 | | Ok(s) => match &s[..] { [INFO] [stdout] 113 | | "mysql" => EngineName::MYSQL, [INFO] [stdout] 114 | | "sqlite" => EngineName::SQLITE, [INFO] [stdout] ... | [INFO] [stdout] 119 | | _ => EngineName::POSTGRESQL [INFO] [stdout] 120 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `Configuration { engine: match settings.get_string("engine") { [INFO] [stdout] Ok(s) => match &s[..] { [INFO] [stdout] "mysql" => EngineName::MYSQL, [INFO] [stdout] "sqlite" => EngineName::SQLITE, [INFO] [stdout] "postgres" | "postgresql" => EngineName::POSTGRESQL, [INFO] [stdout] // TODO: better error here... [INFO] [stdout] _ => EngineName::POSTGRESQL [INFO] [stdout] }, [INFO] [stdout] _ => EngineName::POSTGRESQL [INFO] [stdout] }, host: settings.get_string("host").unwrap_or(String::from("127.0.0.1")), table: settings.get_string("migration_table").unwrap_or(String::from("_schema_migration")), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/main.rs:108:5 [INFO] [stdout] | [INFO] [stdout] 108 | let mut configuration: Configuration = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/main.rs:129:66 [INFO] [stdout] | [INFO] [stdout] 129 | configuration.password = settings.get_string("password").unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/main.rs:137:62 [INFO] [stdout] | [INFO] [stdout] 137 | configuration.password = settings.get_string("password").unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:157:57 [INFO] [stdout] | [INFO] [stdout] 157 | host: args.get_one::("host").unwrap_or(&String::from(file_configuration.host)).to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `file_configuration.host` [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 conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:159:65 [INFO] [stdout] | [INFO] [stdout] 159 | database: args.get_one::("database").unwrap_or(&String::from(file_configuration.database)).to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `file_configuration.database` [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 conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:160:65 [INFO] [stdout] | [INFO] [stdout] 160 | username: args.get_one::("username").unwrap_or(&String::from(file_configuration.username)).to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `file_configuration.username` [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 conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:162:69 [INFO] [stdout] | [INFO] [stdout] 162 | table: args.get_one::("migration_table").unwrap_or(&String::from(file_configuration.table)).to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `file_configuration.table` [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 conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:163:57 [INFO] [stdout] | [INFO] [stdout] 163 | path: args.get_one::("path").unwrap_or(&String::from(file_configuration.path)).to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `file_configuration.path` [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: length comparison to zero [INFO] [stdout] --> src/main.rs:239:8 [INFO] [stdout] | [INFO] [stdout] 239 | if configuration.url.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.url.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] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/main.rs:240:35 [INFO] [stdout] | [INFO] [stdout] 240 | configuration.engine = if configuration.url.starts_with("mysql") == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.url.starts_with("mysql")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/main.rs:242:19 [INFO] [stdout] | [INFO] [stdout] 242 | } else if configuration.url.starts_with("postgres") == true || configuration.url.contains("host=") == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.url.starts_with("postgres")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/main.rs:242:72 [INFO] [stdout] | [INFO] [stdout] 242 | } else if configuration.url.starts_with("postgres") == true || configuration.url.contains("host=") == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.url.contains("host=")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:297:33 [INFO] [stdout] | [INFO] [stdout] 297 | .conflicts_with_all(&["config", "engine", "host", "port", "database", "username", "password"])) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["config", "engine", "host", "port", "database", "username", "password"]` [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/main.rs:469:74 [INFO] [stdout] | [INFO] [stdout] 469 | Some(("create", create_matches)) => extract_parameters("create", &create_matches), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `create_matches` [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/main.rs:470:62 [INFO] [stdout] | [INFO] [stdout] 470 | Some(("up", up_matches)) => extract_parameters("up", &up_matches), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `up_matches` [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/main.rs:471:68 [INFO] [stdout] | [INFO] [stdout] 471 | Some(("down", down_matches)) => extract_parameters("down", &down_matches), [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `down_matches` [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/main.rs:472:74 [INFO] [stdout] | [INFO] [stdout] 472 | Some(("status", status_matches)) => extract_parameters("status", &status_matches), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `status_matches` [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/main.rs:474:47 [INFO] [stdout] | [INFO] [stdout] 474 | extract_parameters("interactive", &interactive_options) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `interactive_options` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `interactive` is never read [INFO] [stdout] --> src/main.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 65 | pub struct Configuration { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 77 | interactive: bool, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Configuration` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/filesystem.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | file_stem = match it.next() { [INFO] [stdout] | _____________________^ [INFO] [stdout] 74 | | Some(s) => s, [INFO] [stdout] 75 | | None => return None [INFO] [stdout] 76 | | }; [INFO] [stdout] | |_________^ help: try instead: `it.next()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `tmp` after checking its variant with `is_some` [INFO] [stdout] --> src/filesystem.rs:140:39 [INFO] [stdout] | [INFO] [stdout] 139 | if tmp.is_some() { [INFO] [stdout] | ---------------- help: try: `if let Some() = tmp` [INFO] [stdout] 140 | let tmp = tmp.unwrap(); [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: length comparison to zero [INFO] [stdout] --> src/filesystem.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 110 | if root.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `root.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/filesystem.rs:118:9 [INFO] [stdout] | [INFO] [stdout] 118 | test.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `test.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/filesystem.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | let restrict: u64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `restrict` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 125 ~ [INFO] [stdout] 126 ~ let restrict: u64 = match filter { [INFO] [stdout] 127 ~ Some(s) => s.parse::().unwrap_or(0), [INFO] [stdout] 128 ~ _ => 0 [INFO] [stdout] 129 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/filesystem.rs:149:29 [INFO] [stdout] | [INFO] [stdout] 149 | / ... match filename { [INFO] [stdout] 150 | | ... Ok(s) => slog::warn!(logger, "Failed to get file: {}", s), [INFO] [stdout] 151 | | ... _ => {} [INFO] [stdout] 152 | | ... } [INFO] [stdout] | |_______________________^ help: try: `if let Ok(s) = filename { slog::warn!(logger, "Failed to get file: {}", s) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `pos_down` after checking its variant with `is_some` [INFO] [stdout] --> src/filesystem.rs:181:32 [INFO] [stdout] | [INFO] [stdout] 180 | if pos_down.is_some() { [INFO] [stdout] | --------------------- help: try: `if let Some() = pos_down` [INFO] [stdout] 181 | let pos_down = pos_down.unwrap(); [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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `pos_up` after checking its variant with `is_some` [INFO] [stdout] --> src/filesystem.rs:193:30 [INFO] [stdout] | [INFO] [stdout] 192 | if pos_up.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = pos_up` [INFO] [stdout] 193 | let pos_up = pos_up.unwrap(); [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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `pos_down` after checking its variant with `is_some` [INFO] [stdout] --> src/filesystem.rs:199:40 [INFO] [stdout] | [INFO] [stdout] 198 | if pos_down.is_some() { [INFO] [stdout] | --------------------- help: try: `if let Some() = pos_down` [INFO] [stdout] 199 | let pos_down = pos_down.unwrap(); [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] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/filesystem.rs:238:39 [INFO] [stdout] | [INFO] [stdout] 238 | let mut s = String::with_capacity(size.abs() as usize); [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `size.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/filesystem.rs:251:29 [INFO] [stdout] | [INFO] [stdout] 251 | return String::from(&s[1..]); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/filesystem.rs:250:5 [INFO] [stdout] | [INFO] [stdout] 250 | if s.starts_with("/") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 250 ~ if let Some() = s.strip_prefix("/") { [INFO] [stdout] 251 ~ return String::from(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NONE` contains a capitalized acronym [INFO] [stdout] --> src/commands/interactive.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | NONE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `None` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DOWN` contains a capitalized acronym [INFO] [stdout] --> src/commands/interactive.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | DOWN, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Down` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `REDO` contains a capitalized acronym [INFO] [stdout] --> src/commands/interactive.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | REDO [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Redo` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/commands/interactive.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | / impl Default for InteractionType { [INFO] [stdout] 27 | | fn default() -> Self { InteractionType::NONE } [INFO] [stdout] 28 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 19 + #[derive(Default)] [INFO] [stdout] 20 | pub enum InteractionType { [INFO] [stdout] 21 ~ #[default] [INFO] [stdout] 22 ~ NONE, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/commands/interactive.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | result.current_type = InteractionType::UP; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `commands::interactive::InteractiveMigration { current_type: InteractionType::UP, number: String::from(migration), migration: Some(String::from(migration)), migration_hash: Some(String::from(hash)), migration_origin: Some(String::from(origin)), file_up: None, file_down: None, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/commands/interactive.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | let mut result: InteractiveMigration = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/commands/interactive.rs:116:12 [INFO] [stdout] | [INFO] [stdout] 116 | if found == false && file.is_up == true { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `!found` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:116:30 [INFO] [stdout] | [INFO] [stdout] 116 | if found == false && file.is_up == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `file.is_up` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/interactive.rs:117:54 [INFO] [stdout] | [INFO] [stdout] 117 | results.push(convert_file_to_interactive(&file)); [INFO] [stdout] | ^^^^^ help: change this to: `file` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:127:20 [INFO] [stdout] | [INFO] [stdout] 127 | if file.is_down == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `file.is_down` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 130 | if file.is_up == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `file.is_up` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `migration.file_up` after checking its variant with `is_some` [INFO] [stdout] --> src/commands/interactive.rs:236:25 [INFO] [stdout] | [INFO] [stdout] 235 | if migration.file_up.is_some() { [INFO] [stdout] | ------------------------------ help: try: `if let Some() = &migration.file_up` [INFO] [stdout] 236 | let f = migration.file_up.as_ref().unwrap(); [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/commands/interactive.rs:162:52 [INFO] [stdout] | [INFO] [stdout] 162 | fn print_menu(term: &Term, root: &str, migrations: &Vec, selected: usize, logger: &slog::Logger) -> std::io::... [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] 162 - fn print_menu(term: &Term, root: &str, migrations: &Vec, selected: usize, logger: &slog::Logger) -> std::io::Result> { [INFO] [stdout] 162 + fn print_menu(term: &Term, root: &str, migrations: &[InteractiveMigration], selected: usize, logger: &slog::Logger) -> std::io::Result> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/commands/interactive.rs:225:13 [INFO] [stdout] | [INFO] [stdout] 225 | content.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `content.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/commands/interactive.rs:291:35 [INFO] [stdout] | [INFO] [stdout] 291 | fn clear_menu(term: &Term, sizes: &mut Vec) -> std::io::Result<()> { [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] 291 - fn clear_menu(term: &Term, sizes: &mut Vec) -> std::io::Result<()> { [INFO] [stdout] 291 + fn clear_menu(term: &Term, sizes: &mut [usize]) -> std::io::Result<()> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/interactive.rs:320:37 [INFO] [stdout] | [INFO] [stdout] 320 | let r = print_menu(&term, root, &migrations, position, logger); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `migrations` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:327:12 [INFO] [stdout] | [INFO] [stdout] 327 | if rerender == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `rerender` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/interactive.rs:333:45 [INFO] [stdout] | [INFO] [stdout] 333 | let r = print_menu(&term, root, &migrations, position, logger); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `migrations` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/commands/interactive.rs:380:17 [INFO] [stdout] | [INFO] [stdout] 380 | / if position > 0 { [INFO] [stdout] 381 | | position = position - 1; [INFO] [stdout] 382 | | rerender = true; [INFO] [stdout] 383 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 379 ~ Key::ArrowUp [INFO] [stdout] 380 ~ if position > 0 => { [INFO] [stdout] 381 | position = position - 1; [INFO] [stdout] 382 | rerender = true; [INFO] [stdout] 383 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/commands/interactive.rs:386:17 [INFO] [stdout] | [INFO] [stdout] 386 | / if position < migrations.len() + 1 { [INFO] [stdout] 387 | | position += 1; [INFO] [stdout] 388 | | rerender = true; [INFO] [stdout] 389 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 385 ~ Key::ArrowDown [INFO] [stdout] 386 ~ if position < migrations.len() + 1 => { [INFO] [stdout] 387 | position += 1; [INFO] [stdout] 388 | rerender = true; [INFO] [stdout] 389 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/commands/interactive.rs:381:21 [INFO] [stdout] | [INFO] [stdout] 381 | position = position - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `position -= 1` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:408:16 [INFO] [stdout] | [INFO] [stdout] 408 | if first == true { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `first` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/commands/interactive.rs:419:21 [INFO] [stdout] | [INFO] [stdout] 419 | let s = format!("{}", file_name); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `file_name.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: empty string literal in `println!` [INFO] [stdout] --> src/commands/interactive.rs:423:5 [INFO] [stdout] | [INFO] [stdout] 423 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/interactive.rs:442:5 [INFO] [stdout] | [INFO] [stdout] 442 | !res.is_err() && (s == "Y" || s == "y" || s == "") [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `res.is_ok()` [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: comparison to empty slice [INFO] [stdout] --> src/commands/interactive.rs:442:47 [INFO] [stdout] | [INFO] [stdout] 442 | !res.is_err() && (s == "Y" || s == "y" || s == "") [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands/interactive.rs:459:5 [INFO] [stdout] | [INFO] [stdout] 459 | / match db.create_migration_table() { [INFO] [stdout] 460 | | Err(e) => { [INFO] [stdout] 461 | | slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 462 | | }, [INFO] [stdout] 463 | | _ => {} [INFO] [stdout] 464 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 459 ~ if let Err(e) = db.create_migration_table() { [INFO] [stdout] 460 + slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 461 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/interactive.rs:504:16 [INFO] [stdout] | [INFO] [stdout] 504 | if migration_down.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!migration_down.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/interactive.rs:509:16 [INFO] [stdout] | [INFO] [stdout] 509 | if migration_up.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!migration_up.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] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/interactive.rs:528:8 [INFO] [stdout] | [INFO] [stdout] 528 | if configuration.debug == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/interactive.rs:538:13 [INFO] [stdout] | [INFO] [stdout] 538 | / match process_interactive_sql(configuration, &mut files, logger) { [INFO] [stdout] 539 | | Err(_e) => false, [INFO] [stdout] 540 | | _ => true [INFO] [stdout] 541 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 538 - match process_interactive_sql(configuration, &mut files, logger) { [INFO] [stdout] 539 - Err(_e) => false, [INFO] [stdout] 540 - _ => true [INFO] [stdout] 541 - } [INFO] [stdout] 538 + !matches!(process_interactive_sql(configuration, &mut files, logger), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands/down.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / match db.create_migration_table() { [INFO] [stdout] 28 | | Err(e) => { [INFO] [stdout] 29 | | slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 30 | | return Err(Box::new(EngineError {})); [INFO] [stdout] 31 | | }, [INFO] [stdout] 32 | | _ => {} [INFO] [stdout] 33 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 27 ~ if let Err(e) = db.create_migration_table() { [INFO] [stdout] 28 + slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 29 + return Err(Box::new(EngineError {})); [INFO] [stdout] 30 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/down.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | if configuration.debug == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/down.rs:53:29 [INFO] [stdout] | [INFO] [stdout] 53 | debug_configuration(&configuration, "Files to be reverted:", "Nothing to revert", &files, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/down.rs:53:91 [INFO] [stdout] | [INFO] [stdout] 53 | debug_configuration(&configuration, "Files to be reverted:", "Nothing to revert", &files, logger); [INFO] [stdout] | ^^^^^^ help: change this to: `files` [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/commands/down.rs:63:41 [INFO] [stdout] | [INFO] [stdout] 63 | let error: bool = match get_sql(&file, 0) { [INFO] [stdout] | ^^^^^ help: change this to: `file` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/down.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | / match db.rollback(&file.origin, &file.number.to_string(), &sql, skip_transaction(&configuration, &sql)) { [INFO] [stdout] 66 | | Err(_e) => true, [INFO] [stdout] 67 | | _ => false [INFO] [stdout] 68 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 65 - match db.rollback(&file.origin, &file.number.to_string(), &sql, skip_transaction(&configuration, &sql)) { [INFO] [stdout] 66 - Err(_e) => true, [INFO] [stdout] 67 - _ => false [INFO] [stdout] 68 - } [INFO] [stdout] 65 + matches!(db.rollback(&file.origin, &file.number.to_string(), &sql, skip_transaction(&configuration, &sql)), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/down.rs:65:98 [INFO] [stdout] | [INFO] [stdout] 65 | match db.rollback(&file.origin, &file.number.to_string(), &sql, skip_transaction(&configuration, &sql)) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/commands/down.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | if error && configuration.continue_on_error == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!configuration.continue_on_error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/down.rs:105:8 [INFO] [stdout] | [INFO] [stdout] 105 | if files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `files.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/down.rs:111:8 [INFO] [stdout] | [INFO] [stdout] 111 | if configuration.version.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.version.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] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/down.rs:128:17 [INFO] [stdout] | [INFO] [stdout] 128 | / match process_down_sql(configuration, &mut files, logger) { [INFO] [stdout] 129 | | Err(_e) => false, [INFO] [stdout] 130 | | _ => true [INFO] [stdout] 131 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 128 - match process_down_sql(configuration, &mut files, logger) { [INFO] [stdout] 129 - Err(_e) => false, [INFO] [stdout] 130 - _ => true [INFO] [stdout] 131 - } [INFO] [stdout] 128 + !matches!(process_down_sql(configuration, &mut files, logger), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands/up.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / match db.create_migration_table() { [INFO] [stdout] 25 | | Err(e) => { [INFO] [stdout] 26 | | slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 27 | | }, [INFO] [stdout] 28 | | _ => {} [INFO] [stdout] 29 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 24 ~ if let Err(e) = db.create_migration_table() { [INFO] [stdout] 25 + slog::crit!(logger, "Error creating migration table: {:?}", e); [INFO] [stdout] 26 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/up.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | if configuration.debug == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/up.rs:46:29 [INFO] [stdout] | [INFO] [stdout] 46 | debug_configuration(&configuration, "Files to be migrated:", "Nothing to migrate", &files, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/up.rs:46:92 [INFO] [stdout] | [INFO] [stdout] 46 | debug_configuration(&configuration, "Files to be migrated:", "Nothing to migrate", &files, logger); [INFO] [stdout] | ^^^^^^ help: change this to: `files` [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/commands/up.rs:55:41 [INFO] [stdout] | [INFO] [stdout] 55 | let error: bool = match get_sql(&file, 1) { [INFO] [stdout] | ^^^^^ help: change this to: `file` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/up.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | / ... match db.migrate(&file.origin, &file.number.to_string(), &configuration.migration_type, &sql, skip_transaction(&configuratio... [INFO] [stdout] 58 | | ... Err(_e) => true, [INFO] [stdout] 59 | | ... _ => false [INFO] [stdout] 60 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 57 - match db.migrate(&file.origin, &file.number.to_string(), &configuration.migration_type, &sql, skip_transaction(&configuration, &sql)) { [INFO] [stdout] 58 - Err(_e) => true, [INFO] [stdout] 59 - _ => false [INFO] [stdout] 60 - } [INFO] [stdout] 57 + matches!(db.migrate(&file.origin, &file.number.to_string(), &configuration.migration_type, &sql, skip_transaction(&configuration, &sql)), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/up.rs:57:128 [INFO] [stdout] | [INFO] [stdout] 57 | ...igration_type, &sql, skip_transaction(&configuration, &sql)) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/commands/up.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | if error && configuration.continue_on_error == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!configuration.continue_on_error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/up.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | if files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `files.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/up.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | if configuration.version.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.version.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] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/up.rs:119:17 [INFO] [stdout] | [INFO] [stdout] 119 | / match process_up_sql(configuration, &mut files, logger) { [INFO] [stdout] 120 | | Err(_e) => false, [INFO] [stdout] 121 | | _ => true [INFO] [stdout] 122 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 119 - match process_up_sql(configuration, &mut files, logger) { [INFO] [stdout] 120 - Err(_e) => false, [INFO] [stdout] 121 - _ => true [INFO] [stdout] 122 - } [INFO] [stdout] 119 + !matches!(process_up_sql(configuration, &mut files, logger), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/create.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | !res.is_err() && (s == "Y" || s == "y" || s == "") [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `res.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | if configuration.debug == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/commands/create.rs:52:47 [INFO] [stdout] | [INFO] [stdout] 52 | !res.is_err() && (s == "Y" || s == "y" || s == "") [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands/create.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | / match write!(file, "{}", content) { [INFO] [stdout] 100 | | Err(e) => slog::crit!(logger, "Could not write to file: {}", e), [INFO] [stdout] 101 | | _ => {} [INFO] [stdout] 102 | | } [INFO] [stdout] | |_____________^ help: try: `if let Err(e) = write!(file, "{}", content) { slog::crit!(logger, "Could not write to file: {}", e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:432:16 [INFO] [stdout] | [INFO] [stdout] 432 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:446:16 [INFO] [stdout] | [INFO] [stdout] 446 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:460:16 [INFO] [stdout] | [INFO] [stdout] 460 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:460:40 [INFO] [stdout] | [INFO] [stdout] 460 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!column_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:465:24 [INFO] [stdout] | [INFO] [stdout] 465 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:477:16 [INFO] [stdout] | [INFO] [stdout] 477 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:477:40 [INFO] [stdout] | [INFO] [stdout] 477 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!column_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:480:24 [INFO] [stdout] | [INFO] [stdout] 480 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:494:16 [INFO] [stdout] | [INFO] [stdout] 494 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:494:40 [INFO] [stdout] | [INFO] [stdout] 494 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!column_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:508:16 [INFO] [stdout] | [INFO] [stdout] 508 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:508:40 [INFO] [stdout] | [INFO] [stdout] 508 | if table_name.len() > 0 && column_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!column_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:522:16 [INFO] [stdout] | [INFO] [stdout] 522 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:536:16 [INFO] [stdout] | [INFO] [stdout] 536 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:550:16 [INFO] [stdout] | [INFO] [stdout] 550 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:564:16 [INFO] [stdout] | [INFO] [stdout] 564 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:578:16 [INFO] [stdout] | [INFO] [stdout] 578 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:592:16 [INFO] [stdout] | [INFO] [stdout] 592 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:606:16 [INFO] [stdout] | [INFO] [stdout] 606 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:620:16 [INFO] [stdout] | [INFO] [stdout] 620 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:634:16 [INFO] [stdout] | [INFO] [stdout] 634 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:648:16 [INFO] [stdout] | [INFO] [stdout] 648 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:662:16 [INFO] [stdout] | [INFO] [stdout] 662 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:676:16 [INFO] [stdout] | [INFO] [stdout] 676 | if name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:690:16 [INFO] [stdout] | [INFO] [stdout] 690 | if trigger_name.len() > 0 && table_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!trigger_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:690:42 [INFO] [stdout] | [INFO] [stdout] 690 | if trigger_name.len() > 0 && table_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:695:24 [INFO] [stdout] | [INFO] [stdout] 695 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:707:16 [INFO] [stdout] | [INFO] [stdout] 707 | if trigger_name.len() > 0 && table_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!trigger_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:707:42 [INFO] [stdout] | [INFO] [stdout] 707 | if trigger_name.len() > 0 && table_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!table_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/create.rs:710:24 [INFO] [stdout] | [INFO] [stdout] 710 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:738:35 [INFO] [stdout] | [INFO] [stdout] 738 | let up_sample = get_sample(0, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:739:37 [INFO] [stdout] | [INFO] [stdout] 739 | let down_sample = get_sample(1, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:792:16 [INFO] [stdout] | [INFO] [stdout] 792 | if configuration.debug == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.debug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:797:66 [INFO] [stdout] | [INFO] [stdout] 797 | create_file(&full_filename, &get_file_content(0, &configuration, logger), logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/create.rs:801:54 [INFO] [stdout] | [INFO] [stdout] 801 | let full_folder = Path::new(folder).join(&[&now, "_", &configuration.create_name].join("")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[&now, "_", &configuration.create_name].join("")` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:810:16 [INFO] [stdout] | [INFO] [stdout] 810 | if create_folder(&configuration, &full_folder_str, logger) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `create_folder(&configuration, &full_folder_str, logger)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:810:30 [INFO] [stdout] | [INFO] [stdout] 810 | if create_folder(&configuration, &full_folder_str, logger) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:822:77 [INFO] [stdout] | [INFO] [stdout] 822 | create_file(&full_filename_up, &get_file_content(1, &configuration, logger), logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:823:79 [INFO] [stdout] | [INFO] [stdout] 823 | create_file(&full_filename_down, &get_file_content(2, &configuration, logger), logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/create.rs:829:59 [INFO] [stdout] | [INFO] [stdout] 829 | let full_filename_up = Path::new(folder).join(&[&now, "_", &configuration.create_name, ".up.sql"].join("")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[&now, "_", &configuration.create_name, ".up.sql"].join("")` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/create.rs:830:61 [INFO] [stdout] | [INFO] [stdout] 830 | let full_filename_down = Path::new(folder).join(&[&now, "_", &configuration.create_name, ".down.sql"].join("")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[&now, "_", &configuration.create_name, ".down.sql"].join("")` [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/commands/create.rs:840:73 [INFO] [stdout] | [INFO] [stdout] 840 | create_file(&full_filename_up, &get_file_content(1, &configuration, logger), logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:841:75 [INFO] [stdout] | [INFO] [stdout] 841 | create_file(&full_filename_down, &get_file_content(2, &configuration, logger), logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:857:8 [INFO] [stdout] | [INFO] [stdout] 857 | if Path::new(&migration_folder).exists() == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Path::new(&migration_folder).exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:858:24 [INFO] [stdout] | [INFO] [stdout] 858 | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `migration_folder` [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/commands/create.rs:858:43 [INFO] [stdout] | [INFO] [stdout] 858 | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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 `if` statement can be collapsed [INFO] [stdout] --> src/commands/create.rs:859:12 [INFO] [stdout] | [INFO] [stdout] 859 | } else if ask_for_new_folder(&configuration, &migration_folder) == true { [INFO] [stdout] | ____________^ [INFO] [stdout] 860 | | if create_folder(&configuration, &migration_folder, logger) == true { [INFO] [stdout] 861 | | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] 862 | | } [INFO] [stdout] 863 | | } [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] 859 ~ } else if ask_for_new_folder(&configuration, &migration_folder) == true [INFO] [stdout] 860 ~ && create_folder(&configuration, &migration_folder, logger) == true { [INFO] [stdout] 861 | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] 862 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:859:15 [INFO] [stdout] | [INFO] [stdout] 859 | } else if ask_for_new_folder(&configuration, &migration_folder) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ask_for_new_folder(&configuration, &migration_folder)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:859:34 [INFO] [stdout] | [INFO] [stdout] 859 | } else if ask_for_new_folder(&configuration, &migration_folder) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:859:50 [INFO] [stdout] | [INFO] [stdout] 859 | } else if ask_for_new_folder(&configuration, &migration_folder) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `migration_folder` [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: equality checks against true are unnecessary [INFO] [stdout] --> src/commands/create.rs:860:12 [INFO] [stdout] | [INFO] [stdout] 860 | if create_folder(&configuration, &migration_folder, logger) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `create_folder(&configuration, &migration_folder, logger)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/create.rs:860:26 [INFO] [stdout] | [INFO] [stdout] 860 | if create_folder(&configuration, &migration_folder, logger) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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/commands/create.rs:860:42 [INFO] [stdout] | [INFO] [stdout] 860 | if create_folder(&configuration, &migration_folder, logger) == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `migration_folder` [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/commands/create.rs:861:28 [INFO] [stdout] | [INFO] [stdout] 861 | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `migration_folder` [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/commands/create.rs:861:47 [INFO] [stdout] | [INFO] [stdout] 861 | process_create(&migration_folder, &configuration, logger); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `configuration` [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 `migration.file_up` after checking its variant with `is_some` [INFO] [stdout] --> src/commands/status.rs:49:25 [INFO] [stdout] | [INFO] [stdout] 48 | if migration.file_up.is_some() { [INFO] [stdout] | ------------------------------ help: try: `if let Some() = &migration.file_up` [INFO] [stdout] 49 | let f = migration.file_up.as_ref().unwrap(); [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/commands/status.rs:16:40 [INFO] [stdout] | [INFO] [stdout] 16 | fn show_status(root: &str, migrations: &mut 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] 16 - fn show_status(root: &str, migrations: &mut Vec) { [INFO] [stdout] 16 + fn show_status(root: &str, migrations: &mut [InteractiveMigration]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/commands/status.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/commands/status.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/commands/status.rs:120:13 [INFO] [stdout] | [INFO] [stdout] 120 | / match process_status_sql(configuration, &mut files, logger) { [INFO] [stdout] 121 | | Err(_e) => false, [INFO] [stdout] 122 | | _ => true [INFO] [stdout] 123 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 120 - match process_status_sql(configuration, &mut files, logger) { [INFO] [stdout] 121 - Err(_e) => false, [INFO] [stdout] 122 - _ => true [INFO] [stdout] 123 - } [INFO] [stdout] 120 + !matches!(process_status_sql(configuration, &mut files, logger), Err(_e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if configuration.url.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.url.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | if files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `files.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if nothing.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!nothing.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] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/engines/postgresql.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | str_error = (&str_error[1..len]).to_owned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `str_error[1..len]` [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: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/engines/postgresql.rs:48:71 [INFO] [stdout] | [INFO] [stdout] 48 | ... let debug = format!("{}^ {}: {}", std::iter::repeat(" ").take(spaces_trimmed).collect::(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `" ".repeat(spaces_trimmed)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] = note: `#[warn(clippy::manual_str_repeat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/engines/postgresql.rs:48:71 [INFO] [stdout] | [INFO] [stdout] 48 | ... let debug = format!("{}^ {}: {}", std::iter::repeat(" ").take(spaces_trimmed).collect::(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(" ", spaces_trimmed)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/engines/postgresql.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | / pub fn new(url: &str, migration_table_name: &str, logger: &slog::Logger) -> Result, Box> { [INFO] [stdout] 93 | | let config = match Config::from_str(url) { [INFO] [stdout] 94 | | Ok(c) => c, [INFO] [stdout] 95 | | Err(e) => { [INFO] [stdout] ... | [INFO] [stdout] 141 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] = note: `#[warn(clippy::new_ret_no_self)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/postgresql.rs:183:65 [INFO] [stdout] | [INFO] [stdout] 183 | let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/postgresql.rs:208:73 [INFO] [stdout] | [INFO] [stdout] 208 | ... let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: methods called `new` usually return `Self` [INFO] [stdout] --> src/engines/sqlite.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new(url: &str, migration_table_name: &str, logger: &slog::Logger) -> Result, Box> { [INFO] [stdout] 16 | | match Connection::open(url) { [INFO] [stdout] 17 | | Ok(connection) => { [INFO] [stdout] 18 | | Ok(Box::new(Sqlite { [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `tmp` after checking its variant with `is_ok` [INFO] [stdout] --> src/engines/sqlite.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 47 | if tmp.is_ok() { [INFO] [stdout] | -------------- help: try: `if let Ok() = tmp` [INFO] [stdout] 48 | results.push(tmp.unwrap()); [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:59:32 [INFO] [stdout] | [INFO] [stdout] 59 | let _ = stmt.query_map(&[&migration_type], |row| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `[&migration_type]` [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: called `unwrap` on `migration_name` after checking its variant with `is_ok` [INFO] [stdout] --> src/engines/sqlite.rs:64:31 [INFO] [stdout] | [INFO] [stdout] 63 | if migration_name.is_ok() { [INFO] [stdout] | ------------------------- help: try: `if let Ok() = migration_name` [INFO] [stdout] 64 | results.push((migration_name.unwrap(), migration_hash.unwrap(), migration_file.unwrap())); [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:78:65 [INFO] [stdout] | [INFO] [stdout] 78 | let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:82:68 [INFO] [stdout] | [INFO] [stdout] 82 | match self.client.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[&version, &hash[..], &migration_type, &file_name]` [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/engines/sqlite.rs:82:70 [INFO] [stdout] | [INFO] [stdout] 82 | match self.client.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `version` [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/engines/sqlite.rs:82:91 [INFO] [stdout] | [INFO] [stdout] 82 | match self.client.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `migration_type` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:103:73 [INFO] [stdout] | [INFO] [stdout] 103 | ... let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:107:68 [INFO] [stdout] | [INFO] [stdout] 107 | ... match trx.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[&version, &hash[..], &migration_type, &file_name]` [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/engines/sqlite.rs:107:70 [INFO] [stdout] | [INFO] [stdout] 107 | ... match trx.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `version` [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/engines/sqlite.rs:107:91 [INFO] [stdout] | [INFO] [stdout] 107 | ... match trx.execute(&insert as &str, &[&version, &hash[..], &migration_type, &file_name]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `migration_type` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:147:65 [INFO] [stdout] | [INFO] [stdout] 147 | match self.client.execute(&del as &str, &[&version]) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[&version]` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/sqlite.rs:170:65 [INFO] [stdout] | [INFO] [stdout] 170 | ... match trx.execute(&del as &str, &[&version]) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[&version]` [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: methods called `new` usually return `Self` [INFO] [stdout] --> src/engines/mysql.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / pub fn new(url: &str, migration_table_name: &str, logger: &slog::Logger) -> Result, Box> { [INFO] [stdout] 17 | | match Pool::new(url) { [INFO] [stdout] 18 | | Ok(client) => { [INFO] [stdout] 19 | | match client.get_conn() { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/engines/mysql.rs:29:25 [INFO] [stdout] | [INFO] [stdout] 29 | return Err(Box::new(e)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - return Err(Box::new(e)); [INFO] [stdout] 29 + Err(Box::new(e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/engines/mysql.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | String::from(migration) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `migration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/mysql.rs:86:65 [INFO] [stdout] | [INFO] [stdout] 86 | let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/engines/mysql.rs:110:73 [INFO] [stdout] | [INFO] [stdout] 110 | ... let hash = format!("{:x}", md5::compute(&migration)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `migration` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/engines.rs:31:71 [INFO] [stdout] | [INFO] [stdout] 31 | fn get_migrations_with_hashes(&mut self, migration_type: &str) -> Result, Box>; [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: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/engines.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | fn migrate(&mut self, file: &PathBuf, version: &str, migration_type: &str, migration: &str, skip_transaction: bool) -> Result<()... [INFO] [stdout] | ^^^^^^^^ help: change this to: `&Path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/engines.rs:33:34 [INFO] [stdout] | [INFO] [stdout] 33 | fn rollback(&mut self, file: &PathBuf, version: &str, migration: &str, skip_transaction: bool) -> Result<(), Box>; [INFO] [stdout] | ^^^^^^^^ help: change this to: `&Path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | if configuration.url.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.url.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | if configuration.password.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.password.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:77:8 [INFO] [stdout] | [INFO] [stdout] 77 | if configuration.url.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.url.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | if configuration.url.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.url.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:94:8 [INFO] [stdout] | [INFO] [stdout] 94 | if configuration.username.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.username.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:100:8 [INFO] [stdout] | [INFO] [stdout] 100 | if configuration.password.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.password.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engines.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | if configuration.database.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.database.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] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/helpers.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | let milliseconds: u128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 27 | milliseconds = internal - 1000 * seconds; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `milliseconds` here [INFO] [stdout] | [INFO] [stdout] 14 ~ [INFO] [stdout] 15 | let seconds: u128; [INFO] [stdout] ... [INFO] [stdout] 26 | seconds = internal / 1000; [INFO] [stdout] 27 ~ let milliseconds: u128 = internal - 1000 * seconds; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/helpers.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | let seconds: u128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 26 | seconds = internal / 1000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `seconds` here [INFO] [stdout] | [INFO] [stdout] 15 ~ [INFO] [stdout] 16 | let minutes: u128; [INFO] [stdout] ... [INFO] [stdout] 25 | //1000 milliseconds in a second [INFO] [stdout] 26 ~ let seconds: u128 = internal / 1000; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/helpers.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | let minutes: u128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 23 | minutes = internal / 60000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `minutes` here [INFO] [stdout] | [INFO] [stdout] 16 ~ [INFO] [stdout] 17 | let hours: u128; [INFO] [stdout] ... [INFO] [stdout] 22 | //60000 milliseconds in a minute [INFO] [stdout] 23 ~ let minutes: u128 = internal / 60000; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/helpers.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | let hours: u128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 20 | hours = internal / 3600000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `hours` here [INFO] [stdout] | [INFO] [stdout] 17 ~ [INFO] [stdout] 18 | [INFO] [stdout] 19 | //3600000 milliseconds in an hour [INFO] [stdout] 20 ~ let hours: u128 = internal / 3600000; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/helpers.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | internal = internal - 3600000 * hours; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `internal -= 3600000 * hours` [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: manual implementation of an assign operation [INFO] [stdout] --> src/helpers.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | internal = internal - 60000 * minutes; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `internal -= 60000 * minutes` [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: length comparison to zero [INFO] [stdout] --> src/helpers.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | if destructive.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!destructive.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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/helpers.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 96 - return None; [INFO] [stdout] 96 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/main.rs:38:1 [INFO] [stdout] | [INFO] [stdout] 38 | / impl Default for CommandName { [INFO] [stdout] 39 | | fn default() -> Self { CommandName::UP } [INFO] [stdout] 40 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 30 + #[derive(Default)] [INFO] [stdout] 31 | pub enum CommandName { [INFO] [stdout] 32 ~ #[default] [INFO] [stdout] 33 ~ UP, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/main.rs:49:1 [INFO] [stdout] | [INFO] [stdout] 49 | / impl Default for EngineName { [INFO] [stdout] 50 | | fn default() -> Self { EngineName::POSTGRESQL } [INFO] [stdout] 51 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 43 + #[derive(Default)] [INFO] [stdout] 44 | pub enum EngineName { [INFO] [stdout] 45 ~ #[default] [INFO] [stdout] 46 ~ POSTGRESQL, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/main.rs:60:1 [INFO] [stdout] | [INFO] [stdout] 60 | / impl Default for CreateType { [INFO] [stdout] 61 | | fn default() -> Self { CreateType::FOLDER } [INFO] [stdout] 62 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 54 + #[derive(Default)] [INFO] [stdout] 55 | pub enum CreateType { [INFO] [stdout] 56 ~ #[default] [INFO] [stdout] 57 ~ FOLDER, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/main.rs:111:5 [INFO] [stdout] | [INFO] [stdout] 111 | / configuration.engine = match settings.get_string("engine") { [INFO] [stdout] 112 | | Ok(s) => match &s[..] { [INFO] [stdout] 113 | | "mysql" => EngineName::MYSQL, [INFO] [stdout] 114 | | "sqlite" => EngineName::SQLITE, [INFO] [stdout] ... | [INFO] [stdout] 119 | | _ => EngineName::POSTGRESQL [INFO] [stdout] 120 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `Configuration { engine: match settings.get_string("engine") { [INFO] [stdout] Ok(s) => match &s[..] { [INFO] [stdout] "mysql" => EngineName::MYSQL, [INFO] [stdout] "sqlite" => EngineName::SQLITE, [INFO] [stdout] "postgres" | "postgresql" => EngineName::POSTGRESQL, [INFO] [stdout] // TODO: better error here... [INFO] [stdout] _ => EngineName::POSTGRESQL [INFO] [stdout] }, [INFO] [stdout] _ => EngineName::POSTGRESQL [INFO] [stdout] }, host: settings.get_string("host").unwrap_or(String::from("127.0.0.1")), table: settings.get_string("migration_table").unwrap_or(String::from("_schema_migration")), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/main.rs:108:5 [INFO] [stdout] | [INFO] [stdout] 108 | let mut configuration: Configuration = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/main.rs:129:66 [INFO] [stdout] | [INFO] [stdout] 129 | configuration.password = settings.get_string("password").unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/main.rs:137:62 [INFO] [stdout] | [INFO] [stdout] 137 | configuration.password = settings.get_string("password").unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:157:57 [INFO] [stdout] | [INFO] [stdout] 157 | host: args.get_one::("host").unwrap_or(&String::from(file_configuration.host)).to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `file_configuration.host` [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 conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:159:65 [INFO] [stdout] | [INFO] [stdout] 159 | database: args.get_one::("database").unwrap_or(&String::from(file_configuration.database)).to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `file_configuration.database` [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 conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:160:65 [INFO] [stdout] | [INFO] [stdout] 160 | username: args.get_one::("username").unwrap_or(&String::from(file_configuration.username)).to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `file_configuration.username` [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 conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:162:69 [INFO] [stdout] | [INFO] [stdout] 162 | table: args.get_one::("migration_table").unwrap_or(&String::from(file_configuration.table)).to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `file_configuration.table` [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 conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:163:57 [INFO] [stdout] | [INFO] [stdout] 163 | path: args.get_one::("path").unwrap_or(&String::from(file_configuration.path)).to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `file_configuration.path` [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: length comparison to zero [INFO] [stdout] --> src/main.rs:239:8 [INFO] [stdout] | [INFO] [stdout] 239 | if configuration.url.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!configuration.url.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] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/main.rs:240:35 [INFO] [stdout] | [INFO] [stdout] 240 | configuration.engine = if configuration.url.starts_with("mysql") == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.url.starts_with("mysql")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/main.rs:242:19 [INFO] [stdout] | [INFO] [stdout] 242 | } else if configuration.url.starts_with("postgres") == true || configuration.url.contains("host=") == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.url.starts_with("postgres")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/main.rs:242:72 [INFO] [stdout] | [INFO] [stdout] 242 | } else if configuration.url.starts_with("postgres") == true || configuration.url.contains("host=") == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `configuration.url.contains("host=")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:297:33 [INFO] [stdout] | [INFO] [stdout] 297 | .conflicts_with_all(&["config", "engine", "host", "port", "database", "username", "password"])) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["config", "engine", "host", "port", "database", "username", "password"]` [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/main.rs:469:74 [INFO] [stdout] | [INFO] [stdout] 469 | Some(("create", create_matches)) => extract_parameters("create", &create_matches), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `create_matches` [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/main.rs:470:62 [INFO] [stdout] | [INFO] [stdout] 470 | Some(("up", up_matches)) => extract_parameters("up", &up_matches), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `up_matches` [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/main.rs:471:68 [INFO] [stdout] | [INFO] [stdout] 471 | Some(("down", down_matches)) => extract_parameters("down", &down_matches), [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `down_matches` [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/main.rs:472:74 [INFO] [stdout] | [INFO] [stdout] 472 | Some(("status", status_matches)) => extract_parameters("status", &status_matches), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `status_matches` [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/main.rs:474:47 [INFO] [stdout] | [INFO] [stdout] 474 | extract_parameters("interactive", &interactive_options) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `interactive_options` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 48s [INFO] running `Command { std: "docker" "inspect" "89b21a07da6006e4aa6518cc9f99ec4e44d9b9f9f0bdee001b6c9488d87cee20", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "89b21a07da6006e4aa6518cc9f99ec4e44d9b9f9f0bdee001b6c9488d87cee20", kill_on_drop: false }` [INFO] [stdout] 89b21a07da6006e4aa6518cc9f99ec4e44d9b9f9f0bdee001b6c9488d87cee20