[INFO] fetching crate pg_migrate 0.1.2... [INFO] linting pg_migrate-0.1.2 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate pg_migrate 0.1.2 into /workspace/builds/worker-5-tc1/source [INFO] started tweaking crates.io crate pg_migrate 0.1.2 [INFO] finished tweaking crates.io crate pg_migrate 0.1.2 [INFO] tweaked toml for crates.io crate pg_migrate 0.1.2 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate pg_migrate 0.1.2 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 crates.io crate pg_migrate 0.1.2 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 postgres-protocol v0.6.6 [INFO] [stderr] Downloaded postgres-types v0.2.6 [INFO] [stderr] Downloaded filedescriptor v0.8.2 [INFO] [stderr] Downloaded gag v1.0.0 [INFO] [stderr] Downloaded postgres v0.19.7 [INFO] [stderr] Downloaded unicode-properties v0.1.1 [INFO] [stderr] Downloaded uuid v1.9.1 [INFO] [stderr] Downloaded whoami v1.5.1 [INFO] [stderr] Downloaded tokio-postgres v0.7.10 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] ffdee2da15f8c4dbc093d653321f955d749024478cbf0fcdbba2ef79a37af8b3 [INFO] running `Command { std: "docker" "start" "-a" "ffdee2da15f8c4dbc093d653321f955d749024478cbf0fcdbba2ef79a37af8b3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ffdee2da15f8c4dbc093d653321f955d749024478cbf0fcdbba2ef79a37af8b3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ffdee2da15f8c4dbc093d653321f955d749024478cbf0fcdbba2ef79a37af8b3", kill_on_drop: false }` [INFO] [stdout] ffdee2da15f8c4dbc093d653321f955d749024478cbf0fcdbba2ef79a37af8b3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] ace3e023b38c6b1dd372323e16ce438a8c7a305aa60be6ee3190a272fa91d3ea [INFO] running `Command { std: "docker" "start" "-a" "ace3e023b38c6b1dd372323e16ce438a8c7a305aa60be6ee3190a272fa91d3ea", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling proc-macro2 v1.0.86 [INFO] [stderr] Checking bytes v1.6.0 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Checking tinyvec v1.6.1 [INFO] [stderr] Checking unicode-properties v0.1.1 [INFO] [stderr] Checking futures-sink v0.3.30 [INFO] [stderr] Checking cpufeatures v0.2.12 [INFO] [stderr] Checking futures-core v0.3.30 [INFO] [stderr] Checking unicode-bidi v0.3.15 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking fallible-iterator v0.2.0 [INFO] [stderr] Compiling thiserror v1.0.61 [INFO] [stderr] Compiling rustix v0.38.34 [INFO] [stderr] Checking anstyle-parse v0.2.4 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking socket2 v0.5.7 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking unicode-normalization v0.1.23 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking phf_shared v0.11.2 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking stringprep v0.1.5 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking tokio v1.38.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling syn v2.0.68 [INFO] [stderr] Checking colorchoice v1.0.1 [INFO] [stderr] Checking futures-task v0.3.30 [INFO] [stderr] Checking anstyle v1.0.7 [INFO] [stderr] Checking anstyle-query v1.1.0 [INFO] [stderr] Checking is_terminal_polyfill v1.70.0 [INFO] [stderr] Checking sha2 v0.10.8 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking anstream v0.6.14 [INFO] [stderr] Checking phf v0.11.2 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Compiling serde v1.0.203 [INFO] [stderr] Checking log v0.4.21 [INFO] [stderr] Checking fastrand v2.1.0 [INFO] [stderr] Checking clap_lex v0.7.1 [INFO] [stderr] Checking postgres-protocol v0.6.6 [INFO] [stderr] Checking whoami v1.5.1 [INFO] [stderr] Checking iana-time-zone v0.1.60 [INFO] [stderr] Checking clap_builder v4.5.7 [INFO] [stderr] Checking uuid v1.9.1 [INFO] [stderr] Checking dotenv v0.15.0 [INFO] [stderr] Checking postgres-types v0.2.6 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Checking tempfile v3.10.1 [INFO] [stderr] Compiling thiserror-impl v1.0.61 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling async-trait v0.1.80 [INFO] [stderr] Compiling clap_derive v4.5.5 [INFO] [stderr] Compiling serde_derive v1.0.203 [INFO] [stderr] Checking tokio-util v0.7.11 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Checking filedescriptor v0.8.2 [INFO] [stderr] Checking gag v1.0.0 [INFO] [stderr] Checking clap v4.5.7 [INFO] [stderr] Checking tokio-postgres v0.7.10 [INFO] [stderr] Checking postgres v0.19.7 [INFO] [stderr] Checking pg_migrate v0.1.2 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary use of `.write(true)` because there is `.append(true)` [INFO] [stdout] --> src/lib.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | .write(true) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove `.write(true)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_open_options [INFO] [stdout] = note: `#[warn(clippy::ineffective_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `.write(true)` because there is `.append(true)` [INFO] [stdout] --> src/lib.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | .write(true) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove `.write(true)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:94:19 [INFO] [stdout] | [INFO] [stdout] 94 | } else if !target.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `target.is_some()` [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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lib.rs:96:19 [INFO] [stdout] | [INFO] [stdout] 96 | } else if count != None { [INFO] [stdout] | ^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `count.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `migration_id` after checking its variant with `is_none` [INFO] [stdout] --> src/lib.rs:108:34 [INFO] [stdout] | [INFO] [stdout] 104 | if migration_id.is_none() { [INFO] [stdout] | ------------------------- help: try: `if let Some() = migration_id` [INFO] [stdout] ... [INFO] [stdout] 108 | println!("Head: {}", migration_id.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: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:106:13 [INFO] [stdout] | [INFO] [stdout] 106 | return Ok(()); [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] 106 - return Ok(()); [INFO] [stdout] 106 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `migration_id` after checking its variant with `is_none` [INFO] [stdout] --> src/lib.rs:118:37 [INFO] [stdout] | [INFO] [stdout] 115 | if migration_id.is_none() { [INFO] [stdout] | ------------------------- help: try: `if let Some() = migration_id` [INFO] [stdout] ... [INFO] [stdout] 118 | println!("Current: {}", migration_id.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: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:150:20 [INFO] [stdout] | [INFO] [stdout] 150 | if !current.is_none() && path.to_str().unwrap().contains(current.as_deref().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `current.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:156:92 [INFO] [stdout] | [INFO] [stdout] 156 | let (_, _, migration_id, migration_name) = self._get_migration_details(&path); [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#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:191:20 [INFO] [stdout] | [INFO] [stdout] 191 | if !current.is_none() && path.to_str().unwrap().contains(current.as_deref().unwrap()) && upgrade { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `current.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:197:96 [INFO] [stdout] | [INFO] [stdout] 197 | let (_, _, migration_id, migration_name) = self._get_migration_details(&path); [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#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:215:83 [INFO] [stdout] | [INFO] [stdout] 215 | let (_, _, migration_id, _) = self._get_migration_details(&path); [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#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:246:20 [INFO] [stdout] | [INFO] [stdout] 246 | if !current.is_none() && path.to_str().unwrap().contains(current.as_deref().unwrap()) && upgrade { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `current.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:276:32 [INFO] [stdout] | [INFO] [stdout] 276 | ... if !down_migration_id.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `down_migration_id.is_some()` [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: called `unwrap` on `down_migration_id` after checking its variant with `is_none` [INFO] [stdout] --> src/lib.rs:277:69 [INFO] [stdout] | [INFO] [stdout] 276 | ... if !down_migration_id.is_none() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 277 | ... println!("{} to: {:?}", direction, &down_migration_id.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:229:41 [INFO] [stdout] | [INFO] [stdout] 229 | fn _migrate_count(&mut self, paths: &mut Vec, upgrade: bool, count: &i32) -> Result<(), Error> { [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] 229 - fn _migrate_count(&mut self, paths: &mut Vec, upgrade: bool, count: &i32) -> Result<(), Error> { [INFO] [stdout] 229 + fn _migrate_count(&mut self, paths: &mut [PathBuf], upgrade: bool, count: &i32) -> Result<(), Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib.rs:249:50 [INFO] [stdout] | [INFO] [stdout] 249 | let sql = fs::read_to_string(&path).unwrap(); [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#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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:251:92 [INFO] [stdout] | [INFO] [stdout] 251 | let (_, _, migration_id, migration_name) = self._get_migration_details(&path); [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#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:302:12 [INFO] [stdout] | [INFO] [stdout] 302 | if paths.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.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: unneeded unit return type [INFO] [stdout] --> src/lib.rs:356:63 [INFO] [stdout] | [INFO] [stdout] 356 | fn _sort_paths(&self, paths: &mut Vec, asc: bool) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [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/lib.rs:356:34 [INFO] [stdout] | [INFO] [stdout] 356 | fn _sort_paths(&self, paths: &mut Vec, asc: bool) -> () { [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] 356 - fn _sort_paths(&self, paths: &mut Vec, asc: bool) -> () { [INFO] [stdout] 356 + fn _sort_paths(&self, paths: &mut [PathBuf], asc: bool) -> () { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:398:20 [INFO] [stdout] | [INFO] [stdout] 398 | if !current.is_none() && path.to_str().unwrap().contains(current.as_deref().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `current.is_some()` [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: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:417:44 [INFO] [stdout] | [INFO] [stdout] 417 | fn _get_migration_details(&self, path: &PathBuf) -> (String, String, String, String) { [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] 417 - fn _get_migration_details(&self, path: &PathBuf) -> (String, String, String, String) { [INFO] [stdout] 417 + fn _get_migration_details(&self, path: &Path) -> (String, String, String, String) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:479:9 [INFO] [stdout] | [INFO] [stdout] 479 | assert_eq!(current.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 479 - assert_eq!(current.is_none(), true); [INFO] [stdout] 479 + assert!(current.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:487:9 [INFO] [stdout] | [INFO] [stdout] 487 | assert_eq!(current.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 487 - assert_eq!(current.is_none(), true); [INFO] [stdout] 487 + assert!(current.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:502:9 [INFO] [stdout] | [INFO] [stdout] 502 | assert_eq!(current.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 502 - assert_eq!(current.is_none(), true); [INFO] [stdout] 502 + assert!(current.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:510:9 [INFO] [stdout] | [INFO] [stdout] 510 | assert_eq!(current.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 510 - assert_eq!(current.is_none(), true); [INFO] [stdout] 510 + assert!(current.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:529:9 [INFO] [stdout] | [INFO] [stdout] 529 | assert_eq!(current.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 529 - assert_eq!(current.is_none(), true); [INFO] [stdout] 529 + assert!(current.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:545:9 [INFO] [stdout] | [INFO] [stdout] 545 | assert_eq!(current.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 545 - assert_eq!(current.is_none(), true); [INFO] [stdout] 545 + assert!(current.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:553:9 [INFO] [stdout] | [INFO] [stdout] 553 | assert_eq!(current.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 553 - assert_eq!(current.is_none(), true); [INFO] [stdout] 553 + assert!(current.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:568:9 [INFO] [stdout] | [INFO] [stdout] 568 | assert_eq!(current.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 568 - assert_eq!(current.is_none(), true); [INFO] [stdout] 568 + assert!(current.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:588:9 [INFO] [stdout] | [INFO] [stdout] 588 | assert_eq!(current.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 588 - assert_eq!(current.is_none(), true); [INFO] [stdout] 588 + assert!(current.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:601:9 [INFO] [stdout] | [INFO] [stdout] 601 | assert_eq!(current.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 601 - assert_eq!(current.is_none(), true); [INFO] [stdout] 601 + assert!(current.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:611:41 [INFO] [stdout] | [INFO] [stdout] 611 | let _ = db_client._save_history(&"622511aa-d4ee-4ea7-a3c9-cd900bc2c2bd", &"add_wallet"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `"622511aa-d4ee-4ea7-a3c9-cd900bc2c2bd"` [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/lib.rs:611:82 [INFO] [stdout] | [INFO] [stdout] 611 | let _ = db_client._save_history(&"622511aa-d4ee-4ea7-a3c9-cd900bc2c2bd", &"add_wallet"); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `"add_wallet"` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:620:9 [INFO] [stdout] | [INFO] [stdout] 620 | assert_eq!(migration_id.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 620 - assert_eq!(migration_id.is_none(), true); [INFO] [stdout] 620 + assert!(migration_id.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:621:9 [INFO] [stdout] | [INFO] [stdout] 621 | assert_eq!(migration_name.is_none(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 621 - assert_eq!(migration_name.is_none(), true); [INFO] [stdout] 621 + assert!(migration_name.is_none()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:651:9 [INFO] [stdout] | [INFO] [stdout] 651 | assert_eq!(exists, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 651 - assert_eq!(exists, true); [INFO] [stdout] 651 + assert!(exists); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:655:9 [INFO] [stdout] | [INFO] [stdout] 655 | assert_eq!(exists, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 655 - assert_eq!(exists, false); [INFO] [stdout] 655 + assert!(!exists); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:663:9 [INFO] [stdout] | [INFO] [stdout] 663 | assert_eq!(is_valid, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 663 - assert_eq!(is_valid, true); [INFO] [stdout] 663 + assert!(is_valid); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:666:9 [INFO] [stdout] | [INFO] [stdout] 666 | assert_eq!(is_valid, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 666 - assert_eq!(is_valid, false); [INFO] [stdout] 666 + assert!(!is_valid); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:669:9 [INFO] [stdout] | [INFO] [stdout] 669 | assert_eq!(is_valid, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 669 - assert_eq!(is_valid, false); [INFO] [stdout] 669 + assert!(!is_valid); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:672:9 [INFO] [stdout] | [INFO] [stdout] 672 | assert_eq!(is_valid, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 672 - assert_eq!(is_valid, false); [INFO] [stdout] 672 + assert!(!is_valid); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/setup.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | DB_CLIENT.as_ref().expect("DB Client not initialized") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `.write(true)` because there is `.append(true)` [INFO] [stdout] --> src/lib.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | .write(true) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove `.write(true)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_open_options [INFO] [stdout] = note: `#[warn(clippy::ineffective_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `.write(true)` because there is `.append(true)` [INFO] [stdout] --> src/lib.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | .write(true) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove `.write(true)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:94:19 [INFO] [stdout] | [INFO] [stdout] 94 | } else if !target.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `target.is_some()` [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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lib.rs:96:19 [INFO] [stdout] | [INFO] [stdout] 96 | } else if count != None { [INFO] [stdout] | ^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `count.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `migration_id` after checking its variant with `is_none` [INFO] [stdout] --> src/lib.rs:108:34 [INFO] [stdout] | [INFO] [stdout] 104 | if migration_id.is_none() { [INFO] [stdout] | ------------------------- help: try: `if let Some() = migration_id` [INFO] [stdout] ... [INFO] [stdout] 108 | println!("Head: {}", migration_id.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: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:106:13 [INFO] [stdout] | [INFO] [stdout] 106 | return Ok(()); [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] 106 - return Ok(()); [INFO] [stdout] 106 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `migration_id` after checking its variant with `is_none` [INFO] [stdout] --> src/lib.rs:118:37 [INFO] [stdout] | [INFO] [stdout] 115 | if migration_id.is_none() { [INFO] [stdout] | ------------------------- help: try: `if let Some() = migration_id` [INFO] [stdout] ... [INFO] [stdout] 118 | println!("Current: {}", migration_id.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: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:150:20 [INFO] [stdout] | [INFO] [stdout] 150 | if !current.is_none() && path.to_str().unwrap().contains(current.as_deref().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `current.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:156:92 [INFO] [stdout] | [INFO] [stdout] 156 | let (_, _, migration_id, migration_name) = self._get_migration_details(&path); [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#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:191:20 [INFO] [stdout] | [INFO] [stdout] 191 | if !current.is_none() && path.to_str().unwrap().contains(current.as_deref().unwrap()) && upgrade { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `current.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:197:96 [INFO] [stdout] | [INFO] [stdout] 197 | let (_, _, migration_id, migration_name) = self._get_migration_details(&path); [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#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:215:83 [INFO] [stdout] | [INFO] [stdout] 215 | let (_, _, migration_id, _) = self._get_migration_details(&path); [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#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:246:20 [INFO] [stdout] | [INFO] [stdout] 246 | if !current.is_none() && path.to_str().unwrap().contains(current.as_deref().unwrap()) && upgrade { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `current.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:276:32 [INFO] [stdout] | [INFO] [stdout] 276 | ... if !down_migration_id.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `down_migration_id.is_some()` [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: called `unwrap` on `down_migration_id` after checking its variant with `is_none` [INFO] [stdout] --> src/lib.rs:277:69 [INFO] [stdout] | [INFO] [stdout] 276 | ... if !down_migration_id.is_none() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 277 | ... println!("{} to: {:?}", direction, &down_migration_id.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:229:41 [INFO] [stdout] | [INFO] [stdout] 229 | fn _migrate_count(&mut self, paths: &mut Vec, upgrade: bool, count: &i32) -> Result<(), Error> { [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] 229 - fn _migrate_count(&mut self, paths: &mut Vec, upgrade: bool, count: &i32) -> Result<(), Error> { [INFO] [stdout] 229 + fn _migrate_count(&mut self, paths: &mut [PathBuf], upgrade: bool, count: &i32) -> Result<(), Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib.rs:249:50 [INFO] [stdout] | [INFO] [stdout] 249 | let sql = fs::read_to_string(&path).unwrap(); [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#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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:251:92 [INFO] [stdout] | [INFO] [stdout] 251 | let (_, _, migration_id, migration_name) = self._get_migration_details(&path); [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#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:302:12 [INFO] [stdout] | [INFO] [stdout] 302 | if paths.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!paths.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: unneeded unit return type [INFO] [stdout] --> src/lib.rs:356:63 [INFO] [stdout] | [INFO] [stdout] 356 | fn _sort_paths(&self, paths: &mut Vec, asc: bool) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [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/lib.rs:356:34 [INFO] [stdout] | [INFO] [stdout] 356 | fn _sort_paths(&self, paths: &mut Vec, asc: bool) -> () { [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] 356 - fn _sort_paths(&self, paths: &mut Vec, asc: bool) -> () { [INFO] [stdout] 356 + fn _sort_paths(&self, paths: &mut [PathBuf], asc: bool) -> () { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:398:20 [INFO] [stdout] | [INFO] [stdout] 398 | if !current.is_none() && path.to_str().unwrap().contains(current.as_deref().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `current.is_some()` [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: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:417:44 [INFO] [stdout] | [INFO] [stdout] 417 | fn _get_migration_details(&self, path: &PathBuf) -> (String, String, String, String) { [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] 417 - fn _get_migration_details(&self, path: &PathBuf) -> (String, String, String, String) { [INFO] [stdout] 417 + fn _get_migration_details(&self, path: &Path) -> (String, String, String, String) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/setup.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | DB_CLIENT.as_ref().expect("DB Client not initialized") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 40.34s [INFO] running `Command { std: "docker" "inspect" "ace3e023b38c6b1dd372323e16ce438a8c7a305aa60be6ee3190a272fa91d3ea", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ace3e023b38c6b1dd372323e16ce438a8c7a305aa60be6ee3190a272fa91d3ea", kill_on_drop: false }` [INFO] [stdout] ace3e023b38c6b1dd372323e16ce438a8c7a305aa60be6ee3190a272fa91d3ea