[INFO] crate dinghy-lib 0.3.5 is already in cache [INFO] extracting crate dinghy-lib 0.3.5 into work/ex/clippy-test-run/sources/stable/reg/dinghy-lib/0.3.5 [INFO] extracting crate dinghy-lib 0.3.5 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/dinghy-lib/0.3.5 [INFO] validating manifest of dinghy-lib-0.3.5 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 dinghy-lib-0.3.5 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 dinghy-lib-0.3.5 [INFO] finished frobbing dinghy-lib-0.3.5 [INFO] frobbed toml for dinghy-lib-0.3.5 written to work/ex/clippy-test-run/sources/stable/reg/dinghy-lib/0.3.5/Cargo.toml [INFO] started frobbing dinghy-lib-0.3.5 [INFO] finished frobbing dinghy-lib-0.3.5 [INFO] frobbed toml for dinghy-lib-0.3.5 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/dinghy-lib/0.3.5/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 dinghy-lib-0.3.5 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-5/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/dinghy-lib/0.3.5:/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] 8d03436e279648661872e4d32190fee344412567f1b58fe73697fbc7c8b16639 [INFO] running `"docker" "start" "-a" "8d03436e279648661872e4d32190fee344412567f1b58fe73697fbc7c8b16639"` [INFO] [stderr] Checking home v0.3.4 [INFO] [stderr] Compiling dinghy-lib v0.3.5 (/opt/crater/workdir) [INFO] [stderr] Checking serde_ignored v0.0.4 [INFO] [stderr] Checking jobserver v0.1.12 [INFO] [stderr] Checking tar v0.4.20 [INFO] [stderr] Checking curl v0.4.19 [INFO] [stderr] Checking dinghy-build v0.3.5 [INFO] [stderr] Checking tempfile v3.0.5 [INFO] [stderr] Checking git2-curl v0.8.2 [INFO] [stderr] Checking crates-io v0.16.0 [INFO] [stderr] Checking cargo v0.27.0 [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/device/android.rs:55:13 [INFO] [stderr] | [INFO] [stderr] 55 | supported_targets: supported_targets, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `supported_targets` [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: redundant field names in struct initialization [INFO] [stderr] --> src/device/mod.rs:67:9 [INFO] [stderr] | [INFO] [stderr] 67 | root_dir: root_dir, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `root_dir` [INFO] [stderr] | [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: redundant field names in struct initialization [INFO] [stderr] --> src/device/android.rs:55:13 [INFO] [stderr] | [INFO] [stderr] 55 | supported_targets: supported_targets, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `supported_targets` [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: redundant field names in struct initialization [INFO] [stderr] --> src/device/mod.rs:67:9 [INFO] [stderr] | [INFO] [stderr] 67 | root_dir: root_dir, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `root_dir` [INFO] [stderr] | [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: 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/config.rs:190:25 [INFO] [stderr] | [INFO] [stderr] 190 | if let Some(home) = ::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/overlay.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | use std::env::home_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/lib.rs:55:5 [INFO] [stderr] | [INFO] [stderr] 55 | use std::env::home_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/overlay.rs:69:40 [INFO] [stderr] | [INFO] [stderr] 69 | if let Some(dinghy_home_dir) = home_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/lib.rs:116:33 [INFO] [stderr] | [INFO] [stderr] 116 | .or(home_dir().map(|it| it.join(".dinghy").join("toolchain").join(platform_name))) [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/config.rs:190:25 [INFO] [stderr] | [INFO] [stderr] 190 | if let Some(home) = ::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/overlay.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | use std::env::home_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/lib.rs:55:5 [INFO] [stderr] | [INFO] [stderr] 55 | use std::env::home_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/overlay.rs:69:40 [INFO] [stderr] | [INFO] [stderr] 69 | if let Some(dinghy_home_dir) = home_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/lib.rs:116:33 [INFO] [stderr] | [INFO] [stderr] 116 | .or(home_dir().map(|it| it.join(".dinghy").join("toolchain").join(platform_name))) [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/compiler.rs:44:18 [INFO] [stderr] | [INFO] [stderr] 44 | run_command: Box, &BuildArgs, &[&str]) -> Result<()>>, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/compiler.rs:93:16 [INFO] [stderr] | [INFO] [stderr] 93 | .split(" ") [INFO] [stderr] | ^^^ help: try using a char instead: `' '` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/compiler.rs:210:48 [INFO] [stderr] | [INFO] [stderr] 210 | fn create_run_command(matches: &ArgMatches) -> Box, &BuildArgs, &[&str]) -> Result<()>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/compiler.rs:218:16 [INFO] [stderr] | [INFO] [stderr] 218 | .split(" ") [INFO] [stderr] | ^^^ help: try using a char instead: `' '` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/compiler.rs:292:63 [INFO] [stderr] | [INFO] [stderr] 292 | args.into_iter().map(|it| it.to_string()).collect_vec().as_slice())? { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/compiler.rs:299:55 [INFO] [stderr] | [INFO] [stderr] 299 | args.into_iter().map(|it| it.to_string()).collect_vec().as_slice())? { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/compiler.rs:306:61 [INFO] [stderr] | [INFO] [stderr] 306 | args.into_iter().map(|it| it.to_string()).collect_vec().as_slice())? { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:344:14 [INFO] [stderr] | [INFO] [stderr] 344 | .ok_or(format!("Invalid file name {:?}", src_lib_path.file_name()))?); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid file name {:?}", src_lib_path.file_name()))` [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/compiler.rs:373:34 [INFO] [stderr] | [INFO] [stderr] 373 | .ok_or(format!("Invalid executable file '{}'", &exe_path.display()))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid executable file '{}'", &exe_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:371:34 [INFO] [stderr] | [INFO] [stderr] 371 | .ok_or(format!("Invalid executable file '{}'", &exe_path.display()))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid executable file '{}'", &exe_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:398:34 [INFO] [stderr] | [INFO] [stderr] 398 | .ok_or(format!("Invalid executable file '{}'", &exe_path.display()))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid executable file '{}'", &exe_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:396:34 [INFO] [stderr] | [INFO] [stderr] 396 | .ok_or(format!("Invalid executable file '{}'", &exe_path.display()))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid executable file '{}'", &exe_path.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 `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`. [INFO] [stderr] --> src/compiler.rs:446:30 [INFO] [stderr] | [INFO] [stderr] 446 | .map(|file_name| linked_library_names.iter() [INFO] [stderr] | ______________________________^ [INFO] [stderr] 447 | | .find(|lib_name| file_name == format!("lib{}.so", lib_name) [INFO] [stderr] 448 | | || file_name == format!("lib{}.dylib", lib_name) [INFO] [stderr] 449 | | || file_name == format!("lib{}.a", lib_name)) [INFO] [stderr] 450 | | .is_some()) [INFO] [stderr] | |__________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::search_is_some)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/compiler.rs:485:24 [INFO] [stderr] | [INFO] [stderr] 485 | lib_name.split("=").last().map(|it| it.to_string()).unwrap_or(lib_name) [INFO] [stderr] | ^^^ help: try using a char instead: `'='` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/compiler.rs:489:9 [INFO] [stderr] | [INFO] [stderr] 489 | / Itertools::flatten( [INFO] [stderr] 490 | | WalkDir::new(&compilation.root_output) [INFO] [stderr] 491 | | .into_iter() [INFO] [stderr] 492 | | .filter_map(|walk_entry| walk_entry.map(|it| it.path().to_path_buf()).ok()) [INFO] [stderr] ... | [INFO] [stderr] 495 | | .flat_map(|build_output| build_output.map(|it| it.library_links))) [INFO] [stderr] 496 | | .map(|lib_name| lib_name.clone()) [INFO] [stderr] | |_____________________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] help: Consider calling the dedicated `cloned` method [INFO] [stderr] | [INFO] [stderr] 489 | Itertools::flatten( [INFO] [stderr] 490 | WalkDir::new(&compilation.root_output) [INFO] [stderr] 491 | .into_iter() [INFO] [stderr] 492 | .filter_map(|walk_entry| walk_entry.map(|it| it.path().to_path_buf()).ok()) [INFO] [stderr] 493 | .filter(is_output_file) [INFO] [stderr] 494 | .map(|output_file| CargoOps::BuildOutput::parse_file(&output_file, "idontcare", &compilation.root_output, &compilation.root_output)) [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/compiler.rs:534:40 [INFO] [stderr] | [INFO] [stderr] 534 | for path_str in line.split(":") { [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:545:10 [INFO] [stderr] | [INFO] [stderr] 545 | .unwrap_or(env::var("PKG_CONFIG_LIBDIR").unwrap_or("".to_string())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| env::var("PKG_CONFIG_LIBDIR").unwrap_or("".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] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:544:74 [INFO] [stderr] | [INFO] [stderr] 544 | .map(|it| target_env_from_triple("PKG_CONFIG_LIBDIR", it, false).unwrap_or("".to_string())) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "".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] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:545:50 [INFO] [stderr] | [INFO] [stderr] 545 | .unwrap_or(env::var("PKG_CONFIG_LIBDIR").unwrap_or("".to_string())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "".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] warning: redundant closure found [INFO] [stderr] --> src/compiler.rs:549:14 [INFO] [stderr] | [INFO] [stderr] 549 | .map(|it| PathBuf::from(it)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `PathBuf::from` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/compiler.rs:548:16 [INFO] [stderr] | [INFO] [stderr] 548 | .split(":") [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/compiler.rs:594:18 [INFO] [stderr] | [INFO] [stderr] 594 | .into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/compiler.rs:600:18 [INFO] [stderr] | [INFO] [stderr] 600 | .into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/config.rs:120:14 [INFO] [stderr] | [INFO] [stderr] 120 | .unwrap_or(vec![]) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| vec![])` [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: use of `unwrap_or` followed by a call to `new` [INFO] [stderr] --> src/config.rs:148:21 [INFO] [stderr] | [INFO] [stderr] 148 | .extend(other.ssh_devices.unwrap_or(collections::BTreeMap::new())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `other.ssh_devices.unwrap_or_default()` [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: use of `unwrap_or` followed by a call to `new` [INFO] [stderr] --> src/config.rs:149:29 [INFO] [stderr] | [INFO] [stderr] 149 | for (id, source) in other.test_data.unwrap_or(collections::BTreeMap::new()) { // TODO Remove key [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `other.test_data.unwrap_or_default()` [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: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/config.rs:154:39 [INFO] [stderr] | [INFO] [stderr] 154 | target: source.target.unwrap_or(source.source.clone()), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| source.source.clone())` [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: single-character string constant used as pattern [INFO] [stderr] --> src/device/android.rs:40:20 [INFO] [stderr] | [INFO] [stderr] 40 | .split(",") [INFO] [stderr] | ^^^ help: try using a char instead: `','` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/device/android.rs:76:14 [INFO] [stderr] | [INFO] [stderr] 76 | .ok_or(format!("Invalid path {}", remote_bundle.bundle_dir.display()))?)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid path {}", remote_bundle.bundle_dir.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/device/android.rs:78:14 [INFO] [stderr] | [INFO] [stderr] 78 | .ok_or(format!("Invalid path {}", remote_bundle.lib_dir.display()))?)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid path {}", remote_bundle.lib_dir.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: methods called `to_*` usually take self by reference; consider choosing a less ambiguous name [INFO] [stderr] --> src/device/android.rs:106:25 [INFO] [stderr] | [INFO] [stderr] 106 | fn to_remote_bundle(build_bundle: &BuildBundle) -> Result { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> src/device/android.rs:192:12 [INFO] [stderr] | [INFO] [stderr] 192 | Ok(fmt.write_str(format!("Android {{ \"id\": \"{}\", \"supported_targets\": {:?} }}", [INFO] [stderr] | ____________^ [INFO] [stderr] 193 | | self.id, [INFO] [stderr] 194 | | self.supported_targets).as_str())?) [INFO] [stderr] | |___________________________________________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unit_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 192 | Ok(()) [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/device/android.rs:200:9 [INFO] [stderr] | [INFO] [stderr] 200 | / match Command::new(command) [INFO] [stderr] 201 | | .arg("--version") [INFO] [stderr] 202 | | .stdout(Stdio::null()) [INFO] [stderr] 203 | | .stderr(Stdio::null()) [INFO] [stderr] ... | [INFO] [stderr] 207 | | Err(_) => false, [INFO] [stderr] 208 | | } [INFO] [stderr] | |_____________^ [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] help: try this [INFO] [stderr] | [INFO] [stderr] 200 | Command::new(command) [INFO] [stderr] 201 | .arg("--version") [INFO] [stderr] 202 | .stdout(Stdio::null()) [INFO] [stderr] 203 | .stderr(Stdio::null()) [INFO] [stderr] 204 | .status().is_ok() [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/device/android.rs:241:61 [INFO] [stderr] | [INFO] [stderr] 241 | for line in String::from_utf8(result.stdout)?.split("\n").skip(1) { [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> src/device/host.rs:104:12 [INFO] [stderr] | [INFO] [stderr] 104 | Ok(fmt.write_str(format!("Host {{ }}").as_str())?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 104 | Ok(()) [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/device/host.rs:104:26 [INFO] [stderr] | [INFO] [stderr] 104 | Ok(fmt.write_str(format!("Host {{ }}").as_str())?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Host {{ }}".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 `unwrap_or` followed by a function call [INFO] [stderr] --> src/device/ssh.rs:79:14 [INFO] [stderr] | [INFO] [stderr] 79 | .unwrap_or("/tmp".into())) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "/tmp".into())` [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: passing a unit value to a function [INFO] [stderr] --> src/device/ssh.rs:152:12 [INFO] [stderr] | [INFO] [stderr] 152 | Ok(fmt.write_str(format!("Ssh {{ \"id\": \"{}\", \"hostname\": \"{}\", \"username\": \"{}\", \"port\": \"{}\" }}", [INFO] [stderr] | ____________^ [INFO] [stderr] 153 | | self.id, [INFO] [stderr] 154 | | self.conf.hostname, [INFO] [stderr] 155 | | self.conf.username, [INFO] [stderr] 156 | | self.conf.port.as_ref().map_or("none".to_string(), |it| it.to_string())).as_str())?) [INFO] [stderr] | |____________________________________________________________________________________________________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 152 | Ok(()) [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/device/mod.rs:51:14 [INFO] [stderr] | [INFO] [stderr] 51 | .ok_or(format!("Invalid file name {:?}", src_lib_path.file_name()))?); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid file name {:?}", src_lib_path.file_name()))` [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: this .into_iter() call is equivalent to .iter() and will not move the HashMap [INFO] [stderr] --> src/overlay.rs:88:14 [INFO] [stderr] | [INFO] [stderr] 88 | .into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: methods called `new` usually return `Self` [INFO] [stderr] --> src/platform/regular_platform.rs:33:5 [INFO] [stderr] | [INFO] [stderr] 33 | / pub fn new>(compiler: &Arc, [INFO] [stderr] 34 | | configuration: PlatformConfiguration, [INFO] [stderr] 35 | | id: String, [INFO] [stderr] 36 | | rustc_triple: String, [INFO] [stderr] ... | [INFO] [stderr] 72 | | })) [INFO] [stderr] 73 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_ret_no_self)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stderr] [INFO] [stderr] warning: methods called `new` usually return `Self` [INFO] [stderr] --> src/platform/host.rs:24:5 [INFO] [stderr] | [INFO] [stderr] 24 | / pub fn new(compiler: &Arc, configuration: PlatformConfiguration) -> Result> { [INFO] [stderr] 25 | | Ok(Box::new(HostPlatform { [INFO] [stderr] 26 | | compiler: compiler.clone(), [INFO] [stderr] 27 | | configuration, [INFO] [stderr] 28 | | id: "host".to_string(), [INFO] [stderr] 29 | | })) [INFO] [stderr] 30 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/platform/mod.rs:18:10 [INFO] [stderr] | [INFO] [stderr] 18 | .ok_or(format!("{} is not a valid executable name", &runnable.exe.display()))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("{} is not a valid executable name", &runnable.exe.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/project.rs:31:14 [INFO] [stderr] | [INFO] [stderr] 31 | .ok_or(format!("Couldn't read project directory {}.", wd_path.display()))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Couldn't read project directory {}.", wd_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/project.rs:66:52 [INFO] [stderr] | [INFO] [stderr] 66 | let target_path = target_path.to_str().ok_or(format!("Invalid UTF-8 path {}", target_path.display()))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid UTF-8 path {}", target_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/project.rs:137:22 [INFO] [stderr] | [INFO] [stderr] 137 | .ok_or(format!("Invalid file {}", dst.display()))?)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid file {}", dst.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: statement can be reduced [INFO] [stderr] --> src/project.rs:148:17 [INFO] [stderr] | [INFO] [stderr] 148 | &fs::create_dir_all(&target)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `fs::create_dir_all(&target)?;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_operation)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/utils.rs:12:10 [INFO] [stderr] | [INFO] [stderr] 12 | .unwrap_or(vec![]) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| vec![])` [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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/utils.rs:41:22 [INFO] [stderr] | [INFO] [stderr] 41 | Ok(path.to_str().ok_or(format!("Path is invalid '{}'", path.display()))?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Path is invalid '{}'", path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/utils.rs:85:10 [INFO] [stderr] | [INFO] [stderr] 85 | .ok_or(format!("'{}' doesn't point to a valid lib name", file_path.display()))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("'{}' doesn't point to a valid lib name", file_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/utils.rs:101:10 [INFO] [stderr] | [INFO] [stderr] 101 | .ok_or(format!("'{}' is not a valid file name", file_path.display()))?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("'{}' is not a valid file name", file_path.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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/lib.rs:95:82 [INFO] [stderr] | [INFO] [stderr] 95 | pub fn discover_platforms(compiler: &Arc, conf: &Configuration) -> Result>)>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/lib.rs:99:14 [INFO] [stderr] | [INFO] [stderr] 99 | .unwrap_or(PlatformConfiguration::empty()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(PlatformConfiguration::empty)` [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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/lib.rs:117:30 [INFO] [stderr] | [INFO] [stderr] 117 | .ok_or(format!("Toolchain missing for platform {}", platform_name))?)?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Toolchain missing for platform {}", platform_name))` [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: use of `or` followed by a function call [INFO] [stderr] --> src/lib.rs:116:30 [INFO] [stderr] | [INFO] [stderr] 116 | .or(home_dir().map(|it| it.join(".dinghy").join("toolchain").join(platform_name))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| home_dir().map(|it| it.join(".dinghy").join("toolchain").join(platform_name)))` [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: redundant closure found [INFO] [stderr] --> src/lib.rs:115:34 [INFO] [stderr] | [INFO] [stderr] 115 | .map(|it| PathBuf::from(it)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `PathBuf::from` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [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/lib.rs:141:35 [INFO] [stderr] | [INFO] [stderr] 141 | fn discover_devices(managers: &Vec>) -> Result>>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Box]` [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: redundant closure found [INFO] [stderr] --> src/lib.rs:145:51 [INFO] [stderr] | [INFO] [stderr] 145 | v.extend(m.devices()?.into_iter().map(|it| Arc::new(it))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Arc::new` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/compiler.rs:44:18 [INFO] [stderr] | [INFO] [stderr] 44 | run_command: Box, &BuildArgs, &[&str]) -> Result<()>>, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/compiler.rs:93:16 [INFO] [stderr] | [INFO] [stderr] 93 | .split(" ") [INFO] [stderr] | ^^^ help: try using a char instead: `' '` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/compiler.rs:210:48 [INFO] [stderr] | [INFO] [stderr] 210 | fn create_run_command(matches: &ArgMatches) -> Box, &BuildArgs, &[&str]) -> Result<()>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/compiler.rs:218:16 [INFO] [stderr] | [INFO] [stderr] 218 | .split(" ") [INFO] [stderr] | ^^^ help: try using a char instead: `' '` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/compiler.rs:292:63 [INFO] [stderr] | [INFO] [stderr] 292 | args.into_iter().map(|it| it.to_string()).collect_vec().as_slice())? { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/compiler.rs:299:55 [INFO] [stderr] | [INFO] [stderr] 299 | args.into_iter().map(|it| it.to_string()).collect_vec().as_slice())? { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/compiler.rs:306:61 [INFO] [stderr] | [INFO] [stderr] 306 | args.into_iter().map(|it| it.to_string()).collect_vec().as_slice())? { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:344:14 [INFO] [stderr] | [INFO] [stderr] 344 | .ok_or(format!("Invalid file name {:?}", src_lib_path.file_name()))?); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid file name {:?}", src_lib_path.file_name()))` [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/compiler.rs:373:34 [INFO] [stderr] | [INFO] [stderr] 373 | .ok_or(format!("Invalid executable file '{}'", &exe_path.display()))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid executable file '{}'", &exe_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:371:34 [INFO] [stderr] | [INFO] [stderr] 371 | .ok_or(format!("Invalid executable file '{}'", &exe_path.display()))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid executable file '{}'", &exe_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:398:34 [INFO] [stderr] | [INFO] [stderr] 398 | .ok_or(format!("Invalid executable file '{}'", &exe_path.display()))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid executable file '{}'", &exe_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:396:34 [INFO] [stderr] | [INFO] [stderr] 396 | .ok_or(format!("Invalid executable file '{}'", &exe_path.display()))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid executable file '{}'", &exe_path.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 `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`. [INFO] [stderr] --> src/compiler.rs:446:30 [INFO] [stderr] | [INFO] [stderr] 446 | .map(|file_name| linked_library_names.iter() [INFO] [stderr] | ______________________________^ [INFO] [stderr] 447 | | .find(|lib_name| file_name == format!("lib{}.so", lib_name) [INFO] [stderr] 448 | | || file_name == format!("lib{}.dylib", lib_name) [INFO] [stderr] 449 | | || file_name == format!("lib{}.a", lib_name)) [INFO] [stderr] 450 | | .is_some()) [INFO] [stderr] | |__________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::search_is_some)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/compiler.rs:485:24 [INFO] [stderr] | [INFO] [stderr] 485 | lib_name.split("=").last().map(|it| it.to_string()).unwrap_or(lib_name) [INFO] [stderr] | ^^^ help: try using a char instead: `'='` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/compiler.rs:489:9 [INFO] [stderr] | [INFO] [stderr] 489 | / Itertools::flatten( [INFO] [stderr] 490 | | WalkDir::new(&compilation.root_output) [INFO] [stderr] 491 | | .into_iter() [INFO] [stderr] 492 | | .filter_map(|walk_entry| walk_entry.map(|it| it.path().to_path_buf()).ok()) [INFO] [stderr] ... | [INFO] [stderr] 495 | | .flat_map(|build_output| build_output.map(|it| it.library_links))) [INFO] [stderr] 496 | | .map(|lib_name| lib_name.clone()) [INFO] [stderr] | |_____________________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] help: Consider calling the dedicated `cloned` method [INFO] [stderr] | [INFO] [stderr] 489 | Itertools::flatten( [INFO] [stderr] 490 | WalkDir::new(&compilation.root_output) [INFO] [stderr] 491 | .into_iter() [INFO] [stderr] 492 | .filter_map(|walk_entry| walk_entry.map(|it| it.path().to_path_buf()).ok()) [INFO] [stderr] 493 | .filter(is_output_file) [INFO] [stderr] 494 | .map(|output_file| CargoOps::BuildOutput::parse_file(&output_file, "idontcare", &compilation.root_output, &compilation.root_output)) [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/compiler.rs:534:40 [INFO] [stderr] | [INFO] [stderr] 534 | for path_str in line.split(":") { [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:545:10 [INFO] [stderr] | [INFO] [stderr] 545 | .unwrap_or(env::var("PKG_CONFIG_LIBDIR").unwrap_or("".to_string())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| env::var("PKG_CONFIG_LIBDIR").unwrap_or("".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] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:544:74 [INFO] [stderr] | [INFO] [stderr] 544 | .map(|it| target_env_from_triple("PKG_CONFIG_LIBDIR", it, false).unwrap_or("".to_string())) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "".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] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/compiler.rs:545:50 [INFO] [stderr] | [INFO] [stderr] 545 | .unwrap_or(env::var("PKG_CONFIG_LIBDIR").unwrap_or("".to_string())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "".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] warning: redundant closure found [INFO] [stderr] --> src/compiler.rs:549:14 [INFO] [stderr] | [INFO] [stderr] 549 | .map(|it| PathBuf::from(it)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `PathBuf::from` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/compiler.rs:548:16 [INFO] [stderr] | [INFO] [stderr] 548 | .split(":") [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/compiler.rs:594:18 [INFO] [stderr] | [INFO] [stderr] 594 | .into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/compiler.rs:600:18 [INFO] [stderr] | [INFO] [stderr] 600 | .into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/config.rs:120:14 [INFO] [stderr] | [INFO] [stderr] 120 | .unwrap_or(vec![]) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| vec![])` [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: use of `unwrap_or` followed by a call to `new` [INFO] [stderr] --> src/config.rs:148:21 [INFO] [stderr] | [INFO] [stderr] 148 | .extend(other.ssh_devices.unwrap_or(collections::BTreeMap::new())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `other.ssh_devices.unwrap_or_default()` [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: use of `unwrap_or` followed by a call to `new` [INFO] [stderr] --> src/config.rs:149:29 [INFO] [stderr] | [INFO] [stderr] 149 | for (id, source) in other.test_data.unwrap_or(collections::BTreeMap::new()) { // TODO Remove key [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `other.test_data.unwrap_or_default()` [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: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/config.rs:154:39 [INFO] [stderr] | [INFO] [stderr] 154 | target: source.target.unwrap_or(source.source.clone()), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| source.source.clone())` [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: single-character string constant used as pattern [INFO] [stderr] --> src/device/android.rs:40:20 [INFO] [stderr] | [INFO] [stderr] 40 | .split(",") [INFO] [stderr] | ^^^ help: try using a char instead: `','` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/device/android.rs:76:14 [INFO] [stderr] | [INFO] [stderr] 76 | .ok_or(format!("Invalid path {}", remote_bundle.bundle_dir.display()))?)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid path {}", remote_bundle.bundle_dir.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/device/android.rs:78:14 [INFO] [stderr] | [INFO] [stderr] 78 | .ok_or(format!("Invalid path {}", remote_bundle.lib_dir.display()))?)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid path {}", remote_bundle.lib_dir.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: methods called `to_*` usually take self by reference; consider choosing a less ambiguous name [INFO] [stderr] --> src/device/android.rs:106:25 [INFO] [stderr] | [INFO] [stderr] 106 | fn to_remote_bundle(build_bundle: &BuildBundle) -> Result { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> src/device/android.rs:192:12 [INFO] [stderr] | [INFO] [stderr] 192 | Ok(fmt.write_str(format!("Android {{ \"id\": \"{}\", \"supported_targets\": {:?} }}", [INFO] [stderr] | ____________^ [INFO] [stderr] 193 | | self.id, [INFO] [stderr] 194 | | self.supported_targets).as_str())?) [INFO] [stderr] | |___________________________________________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unit_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 192 | Ok(()) [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/device/android.rs:200:9 [INFO] [stderr] | [INFO] [stderr] 200 | / match Command::new(command) [INFO] [stderr] 201 | | .arg("--version") [INFO] [stderr] 202 | | .stdout(Stdio::null()) [INFO] [stderr] 203 | | .stderr(Stdio::null()) [INFO] [stderr] ... | [INFO] [stderr] 207 | | Err(_) => false, [INFO] [stderr] 208 | | } [INFO] [stderr] | |_____________^ [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] help: try this [INFO] [stderr] | [INFO] [stderr] 200 | Command::new(command) [INFO] [stderr] 201 | .arg("--version") [INFO] [stderr] 202 | .stdout(Stdio::null()) [INFO] [stderr] 203 | .stderr(Stdio::null()) [INFO] [stderr] 204 | .status().is_ok() [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/device/android.rs:241:61 [INFO] [stderr] | [INFO] [stderr] 241 | for line in String::from_utf8(result.stdout)?.split("\n").skip(1) { [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> src/device/host.rs:104:12 [INFO] [stderr] | [INFO] [stderr] 104 | Ok(fmt.write_str(format!("Host {{ }}").as_str())?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 104 | Ok(()) [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/device/host.rs:104:26 [INFO] [stderr] | [INFO] [stderr] 104 | Ok(fmt.write_str(format!("Host {{ }}").as_str())?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Host {{ }}".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 `unwrap_or` followed by a function call [INFO] [stderr] --> src/device/ssh.rs:79:14 [INFO] [stderr] | [INFO] [stderr] 79 | .unwrap_or("/tmp".into())) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "/tmp".into())` [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: passing a unit value to a function [INFO] [stderr] --> src/device/ssh.rs:152:12 [INFO] [stderr] | [INFO] [stderr] 152 | Ok(fmt.write_str(format!("Ssh {{ \"id\": \"{}\", \"hostname\": \"{}\", \"username\": \"{}\", \"port\": \"{}\" }}", [INFO] [stderr] | ____________^ [INFO] [stderr] 153 | | self.id, [INFO] [stderr] 154 | | self.conf.hostname, [INFO] [stderr] 155 | | self.conf.username, [INFO] [stderr] 156 | | self.conf.port.as_ref().map_or("none".to_string(), |it| it.to_string())).as_str())?) [INFO] [stderr] | |____________________________________________________________________________________________________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 152 | Ok(()) [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/device/mod.rs:51:14 [INFO] [stderr] | [INFO] [stderr] 51 | .ok_or(format!("Invalid file name {:?}", src_lib_path.file_name()))?); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid file name {:?}", src_lib_path.file_name()))` [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: this .into_iter() call is equivalent to .iter() and will not move the HashMap [INFO] [stderr] --> src/overlay.rs:88:14 [INFO] [stderr] | [INFO] [stderr] 88 | .into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: methods called `new` usually return `Self` [INFO] [stderr] --> src/platform/regular_platform.rs:33:5 [INFO] [stderr] | [INFO] [stderr] 33 | / pub fn new>(compiler: &Arc, [INFO] [stderr] 34 | | configuration: PlatformConfiguration, [INFO] [stderr] 35 | | id: String, [INFO] [stderr] 36 | | rustc_triple: String, [INFO] [stderr] ... | [INFO] [stderr] 72 | | })) [INFO] [stderr] 73 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_ret_no_self)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stderr] [INFO] [stderr] warning: methods called `new` usually return `Self` [INFO] [stderr] --> src/platform/host.rs:24:5 [INFO] [stderr] | [INFO] [stderr] 24 | / pub fn new(compiler: &Arc, configuration: PlatformConfiguration) -> Result> { [INFO] [stderr] 25 | | Ok(Box::new(HostPlatform { [INFO] [stderr] 26 | | compiler: compiler.clone(), [INFO] [stderr] 27 | | configuration, [INFO] [stderr] 28 | | id: "host".to_string(), [INFO] [stderr] 29 | | })) [INFO] [stderr] 30 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/platform/mod.rs:18:10 [INFO] [stderr] | [INFO] [stderr] 18 | .ok_or(format!("{} is not a valid executable name", &runnable.exe.display()))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("{} is not a valid executable name", &runnable.exe.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/project.rs:31:14 [INFO] [stderr] | [INFO] [stderr] 31 | .ok_or(format!("Couldn't read project directory {}.", wd_path.display()))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Couldn't read project directory {}.", wd_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/project.rs:66:52 [INFO] [stderr] | [INFO] [stderr] 66 | let target_path = target_path.to_str().ok_or(format!("Invalid UTF-8 path {}", target_path.display()))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid UTF-8 path {}", target_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/project.rs:137:22 [INFO] [stderr] | [INFO] [stderr] 137 | .ok_or(format!("Invalid file {}", dst.display()))?)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Invalid file {}", dst.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: statement can be reduced [INFO] [stderr] --> src/project.rs:148:17 [INFO] [stderr] | [INFO] [stderr] 148 | &fs::create_dir_all(&target)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `fs::create_dir_all(&target)?;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_operation)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/utils.rs:12:10 [INFO] [stderr] | [INFO] [stderr] 12 | .unwrap_or(vec![]) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| vec![])` [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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/utils.rs:41:22 [INFO] [stderr] | [INFO] [stderr] 41 | Ok(path.to_str().ok_or(format!("Path is invalid '{}'", path.display()))?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Path is invalid '{}'", path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/utils.rs:85:10 [INFO] [stderr] | [INFO] [stderr] 85 | .ok_or(format!("'{}' doesn't point to a valid lib name", file_path.display()))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("'{}' doesn't point to a valid lib name", file_path.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/utils.rs:101:10 [INFO] [stderr] | [INFO] [stderr] 101 | .ok_or(format!("'{}' is not a valid file name", file_path.display()))?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("'{}' is not a valid file name", file_path.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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/lib.rs:95:82 [INFO] [stderr] | [INFO] [stderr] 95 | pub fn discover_platforms(compiler: &Arc, conf: &Configuration) -> Result>)>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/lib.rs:99:14 [INFO] [stderr] | [INFO] [stderr] 99 | .unwrap_or(PlatformConfiguration::empty()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(PlatformConfiguration::empty)` [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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/lib.rs:117:30 [INFO] [stderr] | [INFO] [stderr] 117 | .ok_or(format!("Toolchain missing for platform {}", platform_name))?)?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Toolchain missing for platform {}", platform_name))` [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: use of `or` followed by a function call [INFO] [stderr] --> src/lib.rs:116:30 [INFO] [stderr] | [INFO] [stderr] 116 | .or(home_dir().map(|it| it.join(".dinghy").join("toolchain").join(platform_name))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| home_dir().map(|it| it.join(".dinghy").join("toolchain").join(platform_name)))` [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: redundant closure found [INFO] [stderr] --> src/lib.rs:115:34 [INFO] [stderr] | [INFO] [stderr] 115 | .map(|it| PathBuf::from(it)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `PathBuf::from` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [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/lib.rs:141:35 [INFO] [stderr] | [INFO] [stderr] 141 | fn discover_devices(managers: &Vec>) -> Result>>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Box]` [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: redundant closure found [INFO] [stderr] --> src/lib.rs:145:51 [INFO] [stderr] | [INFO] [stderr] 145 | v.extend(m.devices()?.into_iter().map(|it| Arc::new(it))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Arc::new` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 40.47s [INFO] running `"docker" "inspect" "8d03436e279648661872e4d32190fee344412567f1b58fe73697fbc7c8b16639"` [INFO] running `"docker" "rm" "-f" "8d03436e279648661872e4d32190fee344412567f1b58fe73697fbc7c8b16639"` [INFO] [stdout] 8d03436e279648661872e4d32190fee344412567f1b58fe73697fbc7c8b16639