[INFO] crate confsolve 0.3.0 is already in cache [INFO] extracting crate confsolve 0.3.0 into work/ex/clippy-test-run/sources/stable/reg/confsolve/0.3.0 [INFO] extracting crate confsolve 0.3.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/confsolve/0.3.0 [INFO] validating manifest of confsolve-0.3.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 confsolve-0.3.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 confsolve-0.3.0 [INFO] finished frobbing confsolve-0.3.0 [INFO] frobbed toml for confsolve-0.3.0 written to work/ex/clippy-test-run/sources/stable/reg/confsolve/0.3.0/Cargo.toml [INFO] started frobbing confsolve-0.3.0 [INFO] finished frobbing confsolve-0.3.0 [INFO] frobbed toml for confsolve-0.3.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/confsolve/0.3.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 confsolve-0.3.0 against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-4/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/confsolve/0.3.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 -Dclippy::into_iter_on_array" "-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] e9fefa8e3fa08f78c9658e66c65b53d217ccf113bde608e7cfa5ad570d393936 [INFO] running `"docker" "start" "-a" "e9fefa8e3fa08f78c9658e66c65b53d217ccf113bde608e7cfa5ad570d393936"` [INFO] [stderr] Checking confsolve v0.3.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/file_conflict/find.rs:37:41 [INFO] [stderr] | [INFO] [stderr] 37 | let conf = ConflictingFile {details: details, path: file.clone()}; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `details` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/main.rs:99:23 [INFO] [stderr] | [INFO] [stderr] 99 | print!("{}", "(T)ake File (NUM) | (M)ove to Trash | Show (D)iff (NUM [NUM]) | (S)kip | (Q)uit | (H)elp: "); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/file_conflict/find.rs:37:41 [INFO] [stderr] | [INFO] [stderr] 37 | let conf = ConflictingFile {details: details, path: file.clone()}; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `details` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/main.rs:99:23 [INFO] [stderr] | [INFO] [stderr] 99 | print!("{}", "(T)ake File (NUM) | (M)ove to Trash | Show (D)iff (NUM [NUM]) | (S)kip | (Q)uit | (H)elp: "); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: module has the same name as its containing module [INFO] [stderr] --> src/parser/mod.rs:6:1 [INFO] [stderr] | [INFO] [stderr] 6 | pub mod parser; [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::module_inception)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/appdirs.rs:1:5 [INFO] [stderr] | [INFO] [stderr] 1 | use std::env::home_dir; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/appdirs.rs:20:7 [INFO] [stderr] | [INFO] [stderr] 20 | home_dir().map(|mut dir| { dir.push(".cache"); dir }) [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: module has the same name as its containing module [INFO] [stderr] --> src/parser/mod.rs:6:1 [INFO] [stderr] | [INFO] [stderr] 6 | pub mod parser; [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::module_inception)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/appdirs.rs:1:5 [INFO] [stderr] | [INFO] [stderr] 1 | use std::env::home_dir; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/appdirs.rs:20:7 [INFO] [stderr] | [INFO] [stderr] 20 | home_dir().map(|mut dir| { dir.push(".cache"); dir }) [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/appdirs.rs:43:13 [INFO] [stderr] | [INFO] [stderr] 43 | match home_dir() { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/file_system.rs:37:11 [INFO] [stderr] | [INFO] [stderr] 37 | .ok_or(AppError::from_string(format!("Couldn't get filename from path '{}'!", file.display()))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| AppError::from_string(format!("Couldn't get filename from path '{}'!", file.display())))` [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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/file_system.rs:62:8 [INFO] [stderr] | [INFO] [stderr] 62 | .ok_or(AppError::from_string(format!("Couldn't get cache directory!")))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| AppError::from_string(format!("Couldn't get cache directory!")))` [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: useless use of `format!` [INFO] [stderr] --> src/file_system.rs:62:36 [INFO] [stderr] | [INFO] [stderr] 62 | .ok_or(AppError::from_string(format!("Couldn't get cache directory!")))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Couldn't get cache directory!".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/file_system.rs:83:8 [INFO] [stderr] | [INFO] [stderr] 83 | .ok_or(AppError::from_string(format!("Couldn't get filename_str of '{}'!", file_buf.display()))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| AppError::from_string(format!("Couldn't get filename_str of '{}'!", file_buf.display())))` [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: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/file_conflict/find.rs:33:7 [INFO] [stderr] | [INFO] [stderr] 33 | / file.file_name().and_then(|s| s.to_str()).map(|filename| { [INFO] [stderr] 34 | | parse(filename).map(|(orig, details)| { [INFO] [stderr] 35 | | let mut orig_file = file.clone(); [INFO] [stderr] 36 | | orig_file.set_file_name(&orig); [INFO] [stderr] ... | [INFO] [stderr] 42 | | }); [INFO] [stderr] 43 | | }); [INFO] [stderr] | |________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_map_unit_fn)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 33 | if let Some(filename) = file.file_name().and_then(|s| s.to_str()) { parse(filename).map(|(orig, details)| { [INFO] [stderr] 34 | let mut orig_file = file.clone(); [INFO] [stderr] 35 | orig_file.set_file_name(&orig); [INFO] [stderr] 36 | let conf = ConflictingFile {details: details, path: file.clone()}; [INFO] [stderr] 37 | match confs_by_orig.entry(orig_file) { [INFO] [stderr] 38 | Occupied(mut entry) => entry.get_mut().push(conf), [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/file_conflict/find.rs:34:10 [INFO] [stderr] | [INFO] [stderr] 34 | parse(filename).map(|(orig, details)| { [INFO] [stderr] | __________^ [INFO] [stderr] | |__________| [INFO] [stderr] | || [INFO] [stderr] 35 | || let mut orig_file = file.clone(); [INFO] [stderr] 36 | || orig_file.set_file_name(&orig); [INFO] [stderr] 37 | || let conf = ConflictingFile {details: details, path: file.clone()}; [INFO] [stderr] ... || [INFO] [stderr] 41 | || } [INFO] [stderr] 42 | || }); [INFO] [stderr] | ||___________^- help: try this: `if let Some((orig, details)) = parse(filename) { ... }` [INFO] [stderr] | |____________| [INFO] [stderr] | [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/file_conflict/wuala.rs:32:34 [INFO] [stderr] | [INFO] [stderr] 32 | let _ = parser.skip(" from ").or(parser.skip(" from")); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|_| parser.skip(" from"))` [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] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stderr] --> src/parser/stream.rs:19:32 [INFO] [stderr] | [INFO] [stderr] 19 | pub fn eof(&self) -> bool { self.chars.size_hint().0 <= 0 } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::absurd_extreme_comparisons)] on by default [INFO] [stderr] = help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using self.chars.size_hint().0 == 0 instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/user_reply.rs:30:21 [INFO] [stderr] | [INFO] [stderr] 30 | pub fn parse(input: &String, num_conf_files: usize) -> Option [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/args.rs:50:21 [INFO] [stderr] | [INFO] [stderr] 50 | fn is_help_arg(arg: &String) -> bool [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/args.rs:52:4 [INFO] [stderr] | [INFO] [stderr] 52 | *arg == "--help".to_string() || *arg == "-h".to_string() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cmp_owned)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/args.rs:52:36 [INFO] [stderr] | [INFO] [stderr] 52 | *arg == "--help".to_string() || *arg == "-h".to_string() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/args.rs:55:22 [INFO] [stderr] | [INFO] [stderr] 55 | fn is_wuala_arg(arg: &String) -> bool [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/args.rs:57:4 [INFO] [stderr] | [INFO] [stderr] 57 | *arg == "wuala".to_string() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/args.rs:60:24 [INFO] [stderr] | [INFO] [stderr] 60 | fn is_dropbox_arg(arg: &String) -> bool [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/args.rs:62:4 [INFO] [stderr] | [INFO] [stderr] 62 | *arg == "dropbox".to_string() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/args.rs:65:21 [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_args(args: &Vec) -> Command [INFO] [stderr] | ^^^^^^^^^^^^ help: change this to: `&[String]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:109:26 [INFO] [stderr] | [INFO] [stderr] 109 | let ref take_file = conf.conflicting_files[num - 1].path; [INFO] [stderr] | ----^^^^^^^^^^^^^---------------------------------------- help: try: `let take_file = &conf.conflicting_files[num - 1].path;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:165:55 [INFO] [stderr] | [INFO] [stderr] 165 | let diff_cmd_and_args = env::var("CONFSOLVE_DIFF").unwrap_or("gvimdiff -f".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "gvimdiff -f".to_string())` [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] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `confsolve`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/file_system.rs:37:11 [INFO] [stderr] | [INFO] [stderr] 37 | .ok_or(AppError::from_string(format!("Couldn't get filename from path '{}'!", file.display()))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| AppError::from_string(format!("Couldn't get filename from path '{}'!", file.display())))` [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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/file_system.rs:62:8 [INFO] [stderr] | [INFO] [stderr] 62 | .ok_or(AppError::from_string(format!("Couldn't get cache directory!")))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| AppError::from_string(format!("Couldn't get cache directory!")))` [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: useless use of `format!` [INFO] [stderr] --> src/file_system.rs:62:36 [INFO] [stderr] | [INFO] [stderr] 62 | .ok_or(AppError::from_string(format!("Couldn't get cache directory!")))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Couldn't get cache directory!".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/file_system.rs:83:8 [INFO] [stderr] | [INFO] [stderr] 83 | .ok_or(AppError::from_string(format!("Couldn't get filename_str of '{}'!", file_buf.display()))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| AppError::from_string(format!("Couldn't get filename_str of '{}'!", file_buf.display())))` [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: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/file_conflict/find.rs:33:7 [INFO] [stderr] | [INFO] [stderr] 33 | / file.file_name().and_then(|s| s.to_str()).map(|filename| { [INFO] [stderr] 34 | | parse(filename).map(|(orig, details)| { [INFO] [stderr] 35 | | let mut orig_file = file.clone(); [INFO] [stderr] 36 | | orig_file.set_file_name(&orig); [INFO] [stderr] ... | [INFO] [stderr] 42 | | }); [INFO] [stderr] 43 | | }); [INFO] [stderr] | |________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_map_unit_fn)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 33 | if let Some(filename) = file.file_name().and_then(|s| s.to_str()) { parse(filename).map(|(orig, details)| { [INFO] [stderr] 34 | let mut orig_file = file.clone(); [INFO] [stderr] 35 | orig_file.set_file_name(&orig); [INFO] [stderr] 36 | let conf = ConflictingFile {details: details, path: file.clone()}; [INFO] [stderr] 37 | match confs_by_orig.entry(orig_file) { [INFO] [stderr] 38 | Occupied(mut entry) => entry.get_mut().push(conf), [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/file_conflict/find.rs:34:10 [INFO] [stderr] | [INFO] [stderr] 34 | parse(filename).map(|(orig, details)| { [INFO] [stderr] | __________^ [INFO] [stderr] | |__________| [INFO] [stderr] | || [INFO] [stderr] 35 | || let mut orig_file = file.clone(); [INFO] [stderr] 36 | || orig_file.set_file_name(&orig); [INFO] [stderr] 37 | || let conf = ConflictingFile {details: details, path: file.clone()}; [INFO] [stderr] ... || [INFO] [stderr] 41 | || } [INFO] [stderr] 42 | || }); [INFO] [stderr] | ||___________^- help: try this: `if let Some((orig, details)) = parse(filename) { ... }` [INFO] [stderr] | |____________| [INFO] [stderr] | [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/file_conflict/wuala.rs:32:34 [INFO] [stderr] | [INFO] [stderr] 32 | let _ = parser.skip(" from ").or(parser.skip(" from")); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|_| parser.skip(" from"))` [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] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stderr] --> src/parser/stream.rs:19:32 [INFO] [stderr] | [INFO] [stderr] 19 | pub fn eof(&self) -> bool { self.chars.size_hint().0 <= 0 } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::absurd_extreme_comparisons)] on by default [INFO] [stderr] = help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using self.chars.size_hint().0 == 0 instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/user_reply.rs:30:21 [INFO] [stderr] | [INFO] [stderr] 30 | pub fn parse(input: &String, num_conf_files: usize) -> Option [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/args.rs:50:21 [INFO] [stderr] | [INFO] [stderr] 50 | fn is_help_arg(arg: &String) -> bool [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/args.rs:52:4 [INFO] [stderr] | [INFO] [stderr] 52 | *arg == "--help".to_string() || *arg == "-h".to_string() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cmp_owned)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/args.rs:52:36 [INFO] [stderr] | [INFO] [stderr] 52 | *arg == "--help".to_string() || *arg == "-h".to_string() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/args.rs:55:22 [INFO] [stderr] | [INFO] [stderr] 55 | fn is_wuala_arg(arg: &String) -> bool [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/args.rs:57:4 [INFO] [stderr] | [INFO] [stderr] 57 | *arg == "wuala".to_string() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/args.rs:60:24 [INFO] [stderr] | [INFO] [stderr] 60 | fn is_dropbox_arg(arg: &String) -> bool [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/args.rs:62:4 [INFO] [stderr] | [INFO] [stderr] 62 | *arg == "dropbox".to_string() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/args.rs:65:21 [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_args(args: &Vec) -> Command [INFO] [stderr] | ^^^^^^^^^^^^ help: change this to: `&[String]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:109:26 [INFO] [stderr] | [INFO] [stderr] 109 | let ref take_file = conf.conflicting_files[num - 1].path; [INFO] [stderr] | ----^^^^^^^^^^^^^---------------------------------------- help: try: `let take_file = &conf.conflicting_files[num - 1].path;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:165:55 [INFO] [stderr] | [INFO] [stderr] 165 | let diff_cmd_and_args = env::var("CONFSOLVE_DIFF").unwrap_or("gvimdiff -f".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "gvimdiff -f".to_string())` [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] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `confsolve`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "e9fefa8e3fa08f78c9658e66c65b53d217ccf113bde608e7cfa5ad570d393936"` [INFO] running `"docker" "rm" "-f" "e9fefa8e3fa08f78c9658e66c65b53d217ccf113bde608e7cfa5ad570d393936"` [INFO] [stdout] e9fefa8e3fa08f78c9658e66c65b53d217ccf113bde608e7cfa5ad570d393936