[INFO] crate upgradedb4pg 0.1.0 is already in cache [INFO] extracting crate upgradedb4pg 0.1.0 into work/ex/clippy-test-run/sources/stable/reg/upgradedb4pg/0.1.0 [INFO] extracting crate upgradedb4pg 0.1.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/upgradedb4pg/0.1.0 [INFO] validating manifest of upgradedb4pg-0.1.0 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of upgradedb4pg-0.1.0 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing upgradedb4pg-0.1.0 [INFO] finished frobbing upgradedb4pg-0.1.0 [INFO] frobbed toml for upgradedb4pg-0.1.0 written to work/ex/clippy-test-run/sources/stable/reg/upgradedb4pg/0.1.0/Cargo.toml [INFO] started frobbing upgradedb4pg-0.1.0 [INFO] finished frobbing upgradedb4pg-0.1.0 [INFO] frobbed toml for upgradedb4pg-0.1.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/upgradedb4pg/0.1.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting upgradedb4pg-0.1.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-4/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/upgradedb4pg/0.1.0:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 73da442acaf42e61a9c565141eddd8661cb6a7d77efb02f61800e53ebaef0a63 [INFO] running `"docker" "start" "-a" "73da442acaf42e61a9c565141eddd8661cb6a7d77efb02f61800e53ebaef0a63"` [INFO] [stderr] Checking fallible-iterator v0.1.6 [INFO] [stderr] Checking smallvec v0.6.8 [INFO] [stderr] Checking dirs v1.0.4 [INFO] [stderr] Checking dotenv v0.13.0 [INFO] [stderr] Checking rustyline v2.1.0 [INFO] [stderr] Checking unicode-normalization v0.1.8 [INFO] [stderr] Checking stringprep v0.1.2 [INFO] [stderr] Checking postgres-protocol v0.3.2 [INFO] [stderr] Checking postgres-shared v0.4.2 [INFO] [stderr] Checking postgres v0.15.2 [INFO] [stderr] Checking upgradedb4pg v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:16:53 [INFO] [stderr] | [INFO] [stderr] 16 | let mut db_init_file = env::var("DB_INIT_FILE").unwrap_or("init.sql".to_owned()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "init.sql".to_owned())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_some()` [INFO] [stderr] --> src/main.rs:46:12 [INFO] [stderr] | [INFO] [stderr] 46 | if let Some(_) = matches.value_of("debug") { [INFO] [stderr] | _____- ^^^^^^^ [INFO] [stderr] 47 | | debug_mode = true; [INFO] [stderr] 48 | | }; [INFO] [stderr] | |_____- help: try this: `if matches.value_of("debug").is_some()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/main.rs:92:30 [INFO] [stderr] | [INFO] [stderr] 92 | if rows.iter().any(|row| { [INFO] [stderr] | ______________________________^ [INFO] [stderr] 93 | | prev += 1; [INFO] [stderr] 94 | | prev != row.get("line_number") [INFO] [stderr] 95 | | }) { [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/main.rs:207:30 [INFO] [stderr] | [INFO] [stderr] 207 | if rows.iter().any(|row| { [INFO] [stderr] | ______________________________^ [INFO] [stderr] 208 | | prev += 1; [INFO] [stderr] 209 | | prev != row.get("line_number") [INFO] [stderr] 210 | | }) { [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:252:10 [INFO] [stderr] | [INFO] [stderr] 252 | .ok_or(format_err!("database name unset."))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format_err!("database name unset."))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:254:8 [INFO] [stderr] | [INFO] [stderr] 254 | if database_name.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `database_name.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:16:53 [INFO] [stderr] | [INFO] [stderr] 16 | let mut db_init_file = env::var("DB_INIT_FILE").unwrap_or("init.sql".to_owned()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "init.sql".to_owned())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_some()` [INFO] [stderr] --> src/main.rs:46:12 [INFO] [stderr] | [INFO] [stderr] 46 | if let Some(_) = matches.value_of("debug") { [INFO] [stderr] | _____- ^^^^^^^ [INFO] [stderr] 47 | | debug_mode = true; [INFO] [stderr] 48 | | }; [INFO] [stderr] | |_____- help: try this: `if matches.value_of("debug").is_some()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/main.rs:92:30 [INFO] [stderr] | [INFO] [stderr] 92 | if rows.iter().any(|row| { [INFO] [stderr] | ______________________________^ [INFO] [stderr] 93 | | prev += 1; [INFO] [stderr] 94 | | prev != row.get("line_number") [INFO] [stderr] 95 | | }) { [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/main.rs:207:30 [INFO] [stderr] | [INFO] [stderr] 207 | if rows.iter().any(|row| { [INFO] [stderr] | ______________________________^ [INFO] [stderr] 208 | | prev += 1; [INFO] [stderr] 209 | | prev != row.get("line_number") [INFO] [stderr] 210 | | }) { [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:252:10 [INFO] [stderr] | [INFO] [stderr] 252 | .ok_or(format_err!("database name unset."))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format_err!("database name unset."))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:254:8 [INFO] [stderr] | [INFO] [stderr] 254 | if database_name.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `database_name.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 38.70s [INFO] running `"docker" "inspect" "73da442acaf42e61a9c565141eddd8661cb6a7d77efb02f61800e53ebaef0a63"` [INFO] running `"docker" "rm" "-f" "73da442acaf42e61a9c565141eddd8661cb6a7d77efb02f61800e53ebaef0a63"` [INFO] [stdout] 73da442acaf42e61a9c565141eddd8661cb6a7d77efb02f61800e53ebaef0a63