[INFO] fetching crate mj_io 0.1.8... [INFO] linting mj_io-0.1.8 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate mj_io 0.1.8 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate mj_io 0.1.8 [INFO] finished tweaking crates.io crate mj_io 0.1.8 [INFO] tweaked toml for crates.io crate mj_io 0.1.8 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate mj_io 0.1.8 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate mj_io 0.1.8 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] acf3df1ca832c639204798c334fb71e348019f4782eb038bb0ee9a778cd4b4cf [INFO] running `Command { std: "docker" "start" "-a" "acf3df1ca832c639204798c334fb71e348019f4782eb038bb0ee9a778cd4b4cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "acf3df1ca832c639204798c334fb71e348019f4782eb038bb0ee9a778cd4b4cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "acf3df1ca832c639204798c334fb71e348019f4782eb038bb0ee9a778cd4b4cf", kill_on_drop: false }` [INFO] [stdout] acf3df1ca832c639204798c334fb71e348019f4782eb038bb0ee9a778cd4b4cf [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8c4ad945507fcb15dfd2c8887385986738706ad69593971119bbacb35a2ac0bb [INFO] running `Command { std: "docker" "start" "-a" "8c4ad945507fcb15dfd2c8887385986738706ad69593971119bbacb35a2ac0bb", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Compiling zstd-safe v7.2.1 [INFO] [stderr] Checking once_cell v1.20.3 [INFO] [stderr] Checking glob v0.3.2 [INFO] [stderr] Checking miniz_oxide v0.8.4 [INFO] [stderr] Checking console v0.15.10 [INFO] [stderr] Checking indicatif v0.17.11 [INFO] [stderr] Checking flate2 v1.0.35 [INFO] [stderr] Compiling jobserver v0.1.32 [INFO] [stderr] Compiling cc v1.2.13 [INFO] [stderr] Compiling zstd-sys v2.0.13+zstd.1.5.6 [INFO] [stderr] Checking zstd v0.13.2 [INFO] [stderr] Checking mj_io v0.1.8 (/opt/rustwide/workdir) [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:67:19 [INFO] [stdout] | [INFO] [stdout] 67 | let exts = if !manual_ext.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `manual_ext.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `manual_ext` after checking its variant with `is_none` [INFO] [stdout] --> src/lib.rs:68:6 [INFO] [stdout] | [INFO] [stdout] 67 | let exts = if !manual_ext.is_none() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 68 | manual_ext.unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/lib.rs:80:11 [INFO] [stdout] | [INFO] [stdout] 80 | / for entry in glob(&pattern).expect("Failed to read glob pattern") { [INFO] [stdout] 81 | | if let Ok(path) = entry { [INFO] [stdout] 82 | | files.push(path) [INFO] [stdout] 83 | | } [INFO] [stdout] 84 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/lib.rs:81:12 [INFO] [stdout] | [INFO] [stdout] 81 | / if let Ok(path) = entry { [INFO] [stdout] 82 | | files.push(path) [INFO] [stdout] 83 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 80 ~ for path in glob(&pattern).expect("Failed to read glob pattern").flatten() { [INFO] [stdout] 81 ~ files.push(path) [INFO] [stdout] 82 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:94:33 [INFO] [stdout] | [INFO] [stdout] 94 | pub fn has_json_extension(path: &PathBuf) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 94 - pub fn has_json_extension(path: &PathBuf) -> bool { [INFO] [stdout] 94 + pub fn has_json_extension(path: &Path) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:111:40 [INFO] [stdout] | [INFO] [stdout] 111 | pub fn get_output_filename(input_path: &PathBuf, config_input_dir: &PathBuf, config_output_dir: &PathBuf) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 111 ~ pub fn get_output_filename(input_path: &Path, config_input_dir: &PathBuf, config_output_dir: &PathBuf) -> Result { [INFO] [stdout] 112 | // Given an input path that starts with config_input_dir, replaces the input_dir w/ the output_dir [INFO] [stdout] 113 | // NOTE: Will explode if input_path does not start with input_dir [INFO] [stdout] 114 ~ let replaced = input_path.to_path_buf() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:111:97 [INFO] [stdout] | [INFO] [stdout] 111 | pub fn get_output_filename(input_path: &PathBuf, config_input_dir: &PathBuf, config_output_dir: &PathBuf) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 111 ~ pub fn get_output_filename(input_path: &PathBuf, config_input_dir: &PathBuf, config_output_dir: &Path) -> Result { [INFO] [stdout] 112 | // Given an input path that starts with config_input_dir, replaces the input_dir w/ the output_dir [INFO] [stdout] ... [INFO] [stdout] 116 | .ok() [INFO] [stdout] 117 ~ .map(|stripped| config_output_dir.to_path_buf().join(stripped)).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:268:40 [INFO] [stdout] | [INFO] [stdout] 268 | pub fn write_line(&mut self, line: &Vec) -> Result<(), std::io::Error> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 268 - pub fn write_line(&mut self, line: &Vec) -> Result<(), std::io::Error> { [INFO] [stdout] 268 + pub fn write_line(&mut self, line: &[u8]) -> Result<(), std::io::Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:287:25 [INFO] [stdout] | [INFO] [stdout] 287 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 287 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 287 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:298:25 [INFO] [stdout] | [INFO] [stdout] 298 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 298 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 298 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:312:25 [INFO] [stdout] | [INFO] [stdout] 312 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 312 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 312 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:319:25 [INFO] [stdout] | [INFO] [stdout] 319 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 319 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 319 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:333:25 [INFO] [stdout] | [INFO] [stdout] 333 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 333 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 333 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:340:25 [INFO] [stdout] | [INFO] [stdout] 340 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 340 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 340 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:355:25 [INFO] [stdout] | [INFO] [stdout] 355 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 355 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 355 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:363:25 [INFO] [stdout] | [INFO] [stdout] 363 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 363 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 363 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/lib.rs:421:50 [INFO] [stdout] | [INFO] [stdout] 421 | let mut file = File::create(output_file).expect(format!("Unable to create output file {:?}", output_file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Unable to create output file {:?}", output_file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/lib.rs:422:42 [INFO] [stdout] | [INFO] [stdout] 422 | file.write_all(&compressed_data).expect(format!("Unable to write to {:?}", output_file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Unable to write to {:?}", output_file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:430:43 [INFO] [stdout] | [INFO] [stdout] 430 | fn compress_data(data: Vec, filename: &PathBuf) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 430 - fn compress_data(data: Vec, filename: &PathBuf) -> Vec { [INFO] [stdout] 430 + fn compress_data(data: Vec, filename: &Path) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:67:19 [INFO] [stdout] | [INFO] [stdout] 67 | let exts = if !manual_ext.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `manual_ext.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `manual_ext` after checking its variant with `is_none` [INFO] [stdout] --> src/lib.rs:68:6 [INFO] [stdout] | [INFO] [stdout] 67 | let exts = if !manual_ext.is_none() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 68 | manual_ext.unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/lib.rs:80:11 [INFO] [stdout] | [INFO] [stdout] 80 | / for entry in glob(&pattern).expect("Failed to read glob pattern") { [INFO] [stdout] 81 | | if let Ok(path) = entry { [INFO] [stdout] 82 | | files.push(path) [INFO] [stdout] 83 | | } [INFO] [stdout] 84 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/lib.rs:81:12 [INFO] [stdout] | [INFO] [stdout] 81 | / if let Ok(path) = entry { [INFO] [stdout] 82 | | files.push(path) [INFO] [stdout] 83 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 80 ~ for path in glob(&pattern).expect("Failed to read glob pattern").flatten() { [INFO] [stdout] 81 ~ files.push(path) [INFO] [stdout] 82 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:94:33 [INFO] [stdout] | [INFO] [stdout] 94 | pub fn has_json_extension(path: &PathBuf) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 94 - pub fn has_json_extension(path: &PathBuf) -> bool { [INFO] [stdout] 94 + pub fn has_json_extension(path: &Path) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:111:40 [INFO] [stdout] | [INFO] [stdout] 111 | pub fn get_output_filename(input_path: &PathBuf, config_input_dir: &PathBuf, config_output_dir: &PathBuf) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 111 ~ pub fn get_output_filename(input_path: &Path, config_input_dir: &PathBuf, config_output_dir: &PathBuf) -> Result { [INFO] [stdout] 112 | // Given an input path that starts with config_input_dir, replaces the input_dir w/ the output_dir [INFO] [stdout] 113 | // NOTE: Will explode if input_path does not start with input_dir [INFO] [stdout] 114 ~ let replaced = input_path.to_path_buf() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:111:97 [INFO] [stdout] | [INFO] [stdout] 111 | pub fn get_output_filename(input_path: &PathBuf, config_input_dir: &PathBuf, config_output_dir: &PathBuf) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 111 ~ pub fn get_output_filename(input_path: &PathBuf, config_input_dir: &PathBuf, config_output_dir: &Path) -> Result { [INFO] [stdout] 112 | // Given an input path that starts with config_input_dir, replaces the input_dir w/ the output_dir [INFO] [stdout] ... [INFO] [stdout] 116 | .ok() [INFO] [stdout] 117 ~ .map(|stripped| config_output_dir.to_path_buf().join(stripped)).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:268:40 [INFO] [stdout] | [INFO] [stdout] 268 | pub fn write_line(&mut self, line: &Vec) -> Result<(), std::io::Error> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 268 - pub fn write_line(&mut self, line: &Vec) -> Result<(), std::io::Error> { [INFO] [stdout] 268 + pub fn write_line(&mut self, line: &[u8]) -> Result<(), std::io::Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:287:25 [INFO] [stdout] | [INFO] [stdout] 287 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 287 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 287 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:298:25 [INFO] [stdout] | [INFO] [stdout] 298 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 298 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 298 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:312:25 [INFO] [stdout] | [INFO] [stdout] 312 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 312 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 312 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:319:25 [INFO] [stdout] | [INFO] [stdout] 319 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 319 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 319 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:333:25 [INFO] [stdout] | [INFO] [stdout] 333 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 333 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 333 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:340:25 [INFO] [stdout] | [INFO] [stdout] 340 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 340 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 340 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:355:25 [INFO] [stdout] | [INFO] [stdout] 355 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 355 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 355 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:363:25 [INFO] [stdout] | [INFO] [stdout] 363 | Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 363 - Err(std::io::Error::new(std::io::ErrorKind::Other, "Writer already finished")) [INFO] [stdout] 363 + Err(std::io::Error::other("Writer already finished")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/lib.rs:421:50 [INFO] [stdout] | [INFO] [stdout] 421 | let mut file = File::create(output_file).expect(format!("Unable to create output file {:?}", output_file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Unable to create output file {:?}", output_file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/lib.rs:422:42 [INFO] [stdout] | [INFO] [stdout] 422 | file.write_all(&compressed_data).expect(format!("Unable to write to {:?}", output_file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Unable to write to {:?}", output_file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:430:43 [INFO] [stdout] | [INFO] [stdout] 430 | fn compress_data(data: Vec, filename: &PathBuf) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 430 - fn compress_data(data: Vec, filename: &PathBuf) -> Vec { [INFO] [stdout] 430 + fn compress_data(data: Vec, filename: &Path) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.79s [INFO] running `Command { std: "docker" "inspect" "8c4ad945507fcb15dfd2c8887385986738706ad69593971119bbacb35a2ac0bb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8c4ad945507fcb15dfd2c8887385986738706ad69593971119bbacb35a2ac0bb", kill_on_drop: false }` [INFO] [stdout] 8c4ad945507fcb15dfd2c8887385986738706ad69593971119bbacb35a2ac0bb