[INFO] fetching crate ole 0.1.15... [INFO] linting ole-0.1.15 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate ole 0.1.15 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate ole 0.1.15 [INFO] finished tweaking crates.io crate ole 0.1.15 [INFO] tweaked toml for crates.io crate ole 0.1.15 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate ole 0.1.15 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [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] a4ba30a8195cd88633c9236181bf54f0e9d4efa7e5eedef995e39e6c43356adb [INFO] running `Command { std: "docker" "start" "-a" "a4ba30a8195cd88633c9236181bf54f0e9d4efa7e5eedef995e39e6c43356adb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a4ba30a8195cd88633c9236181bf54f0e9d4efa7e5eedef995e39e6c43356adb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a4ba30a8195cd88633c9236181bf54f0e9d4efa7e5eedef995e39e6c43356adb", kill_on_drop: false }` [INFO] [stdout] a4ba30a8195cd88633c9236181bf54f0e9d4efa7e5eedef995e39e6c43356adb [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] 7a13d1074f61263e5922e9e782ba7c28db4aafe6b165355736972403e4b5c3e7 [INFO] running `Command { std: "docker" "start" "-a" "7a13d1074f61263e5922e9e782ba7c28db4aafe6b165355736972403e4b5c3e7", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Checking ole v0.1.15 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/ole.rs:36:1 [INFO] [stdout] | [INFO] [stdout] 36 | / /// ``` [INFO] [stdout] 37 | | [INFO] [stdout] | |_^ [INFO] [stdout] 38 | pub struct Reader<'ole> { [INFO] [stdout] | ----------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/ole.rs:95:14 [INFO] [stdout] | [INFO] [stdout] 95 | pub fn new(readable: T) [INFO] [stdout] | ^ [INFO] [stdout] 96 | -> std::result::Result, super::error::Error> [INFO] [stdout] 97 | where T: std::io::Read { [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iterator.rs:27:7 [INFO] [stdout] | [INFO] [stdout] 27 | ole: ole, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `ole` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entry.rs:303:7 [INFO] [stdout] | [INFO] [stdout] 303 | max_chunk_size: max_chunk_size, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `max_chunk_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/sector.rs:20:15 [INFO] [stdout] | [INFO] [stdout] 20 | -> Result<(&[u8]), super::error::Error> { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 20 - -> Result<(&[u8]), super::error::Error> { [INFO] [stdout] 20 + -> Result<&[u8], super::error::Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/sector.rs:21:24 [INFO] [stdout] | [INFO] [stdout] 21 | let result: Result<(&[u8]), super::error::Error>; [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 21 - let result: Result<(&[u8]), super::error::Error>; [INFO] [stdout] 21 + let result: Result<&[u8], super::error::Error>; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/ole.rs:41:56 [INFO] [stdout] | [INFO] [stdout] 41 | pub(crate) buf_reader: Option>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 41 | pub(crate) buf_reader: Option>>, [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/ole.rs:36:1 [INFO] [stdout] | [INFO] [stdout] 36 | / /// ``` [INFO] [stdout] 37 | | [INFO] [stdout] | |_^ [INFO] [stdout] 38 | pub struct Reader<'ole> { [INFO] [stdout] | ----------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/ole.rs:95:14 [INFO] [stdout] | [INFO] [stdout] 95 | pub fn new(readable: T) [INFO] [stdout] | ^ [INFO] [stdout] 96 | -> std::result::Result, super::error::Error> [INFO] [stdout] 97 | where T: std::io::Read { [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iterator.rs:27:7 [INFO] [stdout] | [INFO] [stdout] 27 | ole: ole, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `ole` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/error.rs:69:30 [INFO] [stdout] | [INFO] [stdout] 69 | fn cause(&self) -> Option<&std::error::Error> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 69 | fn cause(&self) -> Option<&dyn std::error::Error> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/entry.rs:303:7 [INFO] [stdout] | [INFO] [stdout] 303 | max_chunk_size: max_chunk_size, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `max_chunk_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/sector.rs:20:15 [INFO] [stdout] | [INFO] [stdout] 20 | -> Result<(&[u8]), super::error::Error> { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 20 - -> Result<(&[u8]), super::error::Error> { [INFO] [stdout] 20 + -> Result<&[u8], super::error::Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/sector.rs:21:24 [INFO] [stdout] | [INFO] [stdout] 21 | let result: Result<(&[u8]), super::error::Error>; [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 21 - let result: Result<(&[u8]), super::error::Error>; [INFO] [stdout] 21 + let result: Result<&[u8], super::error::Error>; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/ole.rs:41:56 [INFO] [stdout] | [INFO] [stdout] 41 | pub(crate) buf_reader: Option>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 41 | pub(crate) buf_reader: Option>>, [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/error.rs:69:30 [INFO] [stdout] | [INFO] [stdout] 69 | fn cause(&self) -> Option<&std::error::Error> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 69 | fn cause(&self) -> Option<&dyn std::error::Error> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/error.rs:57:34 [INFO] [stdout] | [INFO] [stdout] 57 | Error::IOError(ref e) => e.description(), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/error.rs:80:26 [INFO] [stdout] | [INFO] [stdout] 80 | write!(f, "{}", self.description()) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/ole.rs:176:27 [INFO] [stdout] | [INFO] [stdout] 176 | println!("NOK: {}", e.description()); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/error.rs:57:34 [INFO] [stdout] | [INFO] [stdout] 57 | Error::IOError(ref e) => e.description(), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/error.rs:80:26 [INFO] [stdout] | [INFO] [stdout] 80 | write!(f, "{}", self.description()) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `identifier` and `flags` are never read [INFO] [stdout] --> src/entry.rs:135:3 [INFO] [stdout] | [INFO] [stdout] 111 | pub struct Entry { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 135 | identifier: std::vec::Vec, // 16 bytes [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | flags: std::vec::Vec, // 4 bytes [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Entry` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/error.rs:60:27 [INFO] [stdout] | [INFO] [stdout] 60 | Error::BadSizeValue(ref e) => e, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 60 - Error::BadSizeValue(ref e) => e, [INFO] [stdout] 60 + Error::BadSizeValue(e) => e, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/header.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | if &super::constants::IDENTIFIER != &header[0..8] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 34 - if &super::constants::IDENTIFIER != &header[0..8] { [INFO] [stdout] 34 + if super::constants::IDENTIFIER != header[0..8] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/header.rs:48:10 [INFO] [stdout] | [INFO] [stdout] 48 | if &header[28..30] == &super::constants::BIG_ENDIAN_IDENTIFIER { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 48 - if &header[28..30] == &super::constants::BIG_ENDIAN_IDENTIFIER { [INFO] [stdout] 48 + if header[28..30] == super::constants::BIG_ENDIAN_IDENTIFIER { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/header.rs:51:11 [INFO] [stdout] | [INFO] [stdout] 51 | &header[28..30] != &super::constants::LITTLE_ENDIAN_IDENTIFIER { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 51 - &header[28..30] != &super::constants::LITTLE_ENDIAN_IDENTIFIER { [INFO] [stdout] 51 + header[28..30] != super::constants::LITTLE_ENDIAN_IDENTIFIER { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/header.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | let sat: std::vec::Vec; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 82 | / sat = std::vec::Vec::with_capacity( [INFO] [stdout] 83 | | (*self.sec_size.as_ref().unwrap() / 4) [INFO] [stdout] 84 | | * usize::from_slice(&header[44..48])); [INFO] [stdout] | |____________________________________________________^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `sat` here [INFO] [stdout] | [INFO] [stdout] 78 ~ [INFO] [stdout] 79 | [INFO] [stdout] 80 | [INFO] [stdout] 81 | // Total number of sectors used for the sector allocation table [INFO] [stdout] 82 ~ let sat: std::vec::Vec = std::vec::Vec::with_capacity( [INFO] [stdout] 83 + (*self.sec_size.as_ref().unwrap() / 4) [INFO] [stdout] 84 ~ * usize::from_slice(&header[44..48])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/header.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | / let mut dsat: std::vec::Vec = std::vec::Vec::new(); [INFO] [stdout] 88 | | dsat.push(u32::from_slice(&header[48..52])); [INFO] [stdout] | |________________________________________________________^ help: consider using the `vec![]` macro: `let dsat: std::vec::Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/header.rs:114:18 [INFO] [stdout] | [INFO] [stdout] 114 | if &header[68..72] != &super::constants::END_OF_CHAIN_SECID { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 114 - if &header[68..72] != &super::constants::END_OF_CHAIN_SECID { [INFO] [stdout] 114 + if header[68..72] != super::constants::END_OF_CHAIN_SECID { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/header.rs:174:8 [INFO] [stdout] | [INFO] [stdout] 174 | if !self.body.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.body.is_none()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/header.rs:179:51 [INFO] [stdout] | [INFO] [stdout] 179 | self.buf_reader.as_mut().unwrap().read_to_end(&mut [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 180 | | buf).map_err(super::error::Error::IOError)?; [INFO] [stdout] | |_________^ help: change this to: `buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/header.rs:190:30 [INFO] [stdout] | [INFO] [stdout] 190 | while i < max_sec_ids && &buffer[offset .. offset + 4] [INFO] [stdout] | ______________________________^ [INFO] [stdout] 191 | | != &super::constants::FREE_SECID { [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 190 ~ while i < max_sec_ids && buffer[offset .. offset + 4] [INFO] [stdout] 191 ~ != super::constants::FREE_SECID { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `buf` [INFO] [stdout] --> src/util.rs:26:14 [INFO] [stdout] | [INFO] [stdout] 26 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 26 - for i in 0..buf.len() { [INFO] [stdout] 26 + for in &buf { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `p` is used as a loop counter [INFO] [stdout] --> src/util.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (p, i) in (0..buf.len()).enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `buf` [INFO] [stdout] --> src/util.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 38 - for i in 0..buf.len() { [INFO] [stdout] 38 + for in &buf { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `p` is used as a loop counter [INFO] [stdout] --> src/util.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (p, i) in (0..buf.len()).enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `buf` [INFO] [stdout] --> src/util.rs:50:14 [INFO] [stdout] | [INFO] [stdout] 50 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 50 - for i in 0..buf.len() { [INFO] [stdout] 50 + for in &buf { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `p` is used as a loop counter [INFO] [stdout] --> src/util.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (p, i) in (0..buf.len()).enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `buf` [INFO] [stdout] --> src/util.rs:62:14 [INFO] [stdout] | [INFO] [stdout] 62 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 62 - for i in 0..buf.len() { [INFO] [stdout] 62 + for in &buf { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `p` is used as a loop counter [INFO] [stdout] --> src/util.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (p, i) in (0..buf.len()).enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/sat.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | let result: Result<(), super::error::Error>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `result` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 24 ~ [INFO] [stdout] 25 | let mut sec_ids = vec![super::constants::FREE_SECID_U32; [INFO] [stdout] 26 | sector_size / 4]; [INFO] [stdout] 27 ~ let result: Result<(), super::error::Error> = if self.msat.as_ref().unwrap().len() == 0 { [INFO] [stdout] 28 ~ Err(super::error::Error::EmptyMasterSectorAllocationTable) [INFO] [stdout] 29 | } else { [INFO] [stdout] ... [INFO] [stdout] 36 | self.build_dsat()?; [INFO] [stdout] 37 ~ Ok(()) [INFO] [stdout] 38 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/sat.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | if self.msat.as_ref().unwrap().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.msat.as_ref().unwrap().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/entry.rs:193:7 [INFO] [stdout] | [INFO] [stdout] 193 | i = i + 2; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Entry` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/entry.rs:226:3 [INFO] [stdout] | [INFO] [stdout] 226 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `EntrySlice` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/entry.rs:317:3 [INFO] [stdout] | [INFO] [stdout] 317 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/entry.rs:401:9 [INFO] [stdout] | [INFO] [stdout] 401 | k = k + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `k += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `entries` [INFO] [stdout] --> src/entry.rs:405:14 [INFO] [stdout] | [INFO] [stdout] 405 | for i in 0 .. entries.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 405 - for i in 0 .. entries.len() { [INFO] [stdout] 405 + for (i, ) in entries.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/entry.rs:442:19 [INFO] [stdout] | [INFO] [stdout] 442 | let start = ssector_index as usize * ssector_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `ssector_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `parent_id` after checking its variant with `is_some` [INFO] [stdout] --> src/entry.rs:474:40 [INFO] [stdout] | [INFO] [stdout] 473 | if parent_id.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = parent_id` [INFO] [stdout] 474 | self.entries.as_mut().unwrap()[parent_id.unwrap() as usize] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.body` after checking its variant with `is_some` [INFO] [stdout] --> src/sector.rs:28:19 [INFO] [stdout] | [INFO] [stdout] 27 | if self.body.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = &self.body` [INFO] [stdout] 28 | body_size = self.body.as_ref().unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/sector.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | let body_size: usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `body_size` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 26 ~ [INFO] [stdout] 27 ~ let body_size: usize = if self.body.is_some() { [INFO] [stdout] 28 ~ self.body.as_ref().unwrap().len() [INFO] [stdout] 29 | } else { [INFO] [stdout] 30 ~ 0 [INFO] [stdout] 31 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ole.rs:129:26 [INFO] [stdout] | [INFO] [stdout] 129 | pub fn from_path(path: &str) -> Result { [INFO] [stdout] | ^^^^ ^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 129 | pub fn from_path(path: &str) -> Result, super::error::Error> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ole.rs:147:18 [INFO] [stdout] | [INFO] [stdout] 147 | pub fn iterate(&self) -> super::iterator::OLEIterator { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 147 | pub fn iterate(&self) -> super::iterator::OLEIterator<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/entry.rs:368:26 [INFO] [stdout] | [INFO] [stdout] 368 | pub fn get_entry_slice(&self, entry: &Entry) -> [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] 369 | Result { [INFO] [stdout] | ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 369 | Result, super::error::Error> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/entry.rs:429:30 [INFO] [stdout] | [INFO] [stdout] 429 | fn get_short_stream_slices(&self, chain: &std::vec::Vec, size: usize) [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] 430 | -> Result { [INFO] [stdout] | ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 430 | -> Result, super::error::Error> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/entry.rs:450:24 [INFO] [stdout] | [INFO] [stdout] 450 | fn get_stream_slices(&self, chain: &std::vec::Vec, size: usize) [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] 451 | -> Result { [INFO] [stdout] | ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 451 | -> Result, super::error::Error> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `identifier` and `flags` are never read [INFO] [stdout] --> src/entry.rs:135:3 [INFO] [stdout] | [INFO] [stdout] 111 | pub struct Entry { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 135 | identifier: std::vec::Vec, // 16 bytes [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | flags: std::vec::Vec, // 4 bytes [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Entry` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/ole.rs:174:5 [INFO] [stdout] | [INFO] [stdout] 174 | assert_eq!(o.is_ok(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 174 - assert_eq!(o.is_ok(), false); [INFO] [stdout] 174 + assert!(!o.is_ok()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/ole.rs:183:5 [INFO] [stdout] | [INFO] [stdout] 183 | assert_eq!(o.is_ok(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 183 - assert_eq!(o.is_ok(), true); [INFO] [stdout] 183 + assert!(o.is_ok()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/ole.rs:199:5 [INFO] [stdout] | [INFO] [stdout] 199 | assert_eq!(ole.is_ok(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 199 - assert_eq!(ole.is_ok(), false); [INFO] [stdout] 199 + assert!(!ole.is_ok()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/ole.rs:216:5 [INFO] [stdout] | [INFO] [stdout] 216 | assert_eq!(ole.is_ok(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 216 - assert_eq!(ole.is_ok(), false); [INFO] [stdout] 216 + assert!(!ole.is_ok()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/ole.rs:223:5 [INFO] [stdout] | [INFO] [stdout] 223 | assert_eq!(ole.is_ok(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 223 - assert_eq!(ole.is_ok(), true); [INFO] [stdout] 223 + assert!(ole.is_ok()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/ole.rs:225:5 [INFO] [stdout] | [INFO] [stdout] 225 | assert_eq!(&[0x0u8; 16] == &ole.uid[..], true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 225 - assert_eq!(&[0x0u8; 16] == &ole.uid[..], true); [INFO] [stdout] 225 + assert!(&[0x0u8; 16] == &ole.uid[..]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ole.rs:225:16 [INFO] [stdout] | [INFO] [stdout] 225 | assert_eq!(&[0x0u8; 16] == &ole.uid[..], true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 225 - assert_eq!(&[0x0u8; 16] == &ole.uid[..], true); [INFO] [stdout] 225 + assert_eq!([0x0u8; 16] == ole.uid[..], true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/ole.rs:238:5 [INFO] [stdout] | [INFO] [stdout] 238 | assert_eq!(ole.is_ok(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 238 - assert_eq!(ole.is_ok(), false); [INFO] [stdout] 238 + assert!(!ole.is_ok()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/error.rs:60:27 [INFO] [stdout] | [INFO] [stdout] 60 | Error::BadSizeValue(ref e) => e, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 60 - Error::BadSizeValue(ref e) => e, [INFO] [stdout] 60 + Error::BadSizeValue(e) => e, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/header.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | if &super::constants::IDENTIFIER != &header[0..8] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 34 - if &super::constants::IDENTIFIER != &header[0..8] { [INFO] [stdout] 34 + if super::constants::IDENTIFIER != header[0..8] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/header.rs:48:10 [INFO] [stdout] | [INFO] [stdout] 48 | if &header[28..30] == &super::constants::BIG_ENDIAN_IDENTIFIER { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 48 - if &header[28..30] == &super::constants::BIG_ENDIAN_IDENTIFIER { [INFO] [stdout] 48 + if header[28..30] == super::constants::BIG_ENDIAN_IDENTIFIER { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/header.rs:51:11 [INFO] [stdout] | [INFO] [stdout] 51 | &header[28..30] != &super::constants::LITTLE_ENDIAN_IDENTIFIER { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 51 - &header[28..30] != &super::constants::LITTLE_ENDIAN_IDENTIFIER { [INFO] [stdout] 51 + header[28..30] != super::constants::LITTLE_ENDIAN_IDENTIFIER { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/header.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | let sat: std::vec::Vec; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 82 | / sat = std::vec::Vec::with_capacity( [INFO] [stdout] 83 | | (*self.sec_size.as_ref().unwrap() / 4) [INFO] [stdout] 84 | | * usize::from_slice(&header[44..48])); [INFO] [stdout] | |____________________________________________________^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `sat` here [INFO] [stdout] | [INFO] [stdout] 78 ~ [INFO] [stdout] 79 | [INFO] [stdout] 80 | [INFO] [stdout] 81 | // Total number of sectors used for the sector allocation table [INFO] [stdout] 82 ~ let sat: std::vec::Vec = std::vec::Vec::with_capacity( [INFO] [stdout] 83 + (*self.sec_size.as_ref().unwrap() / 4) [INFO] [stdout] 84 ~ * usize::from_slice(&header[44..48])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/header.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | / let mut dsat: std::vec::Vec = std::vec::Vec::new(); [INFO] [stdout] 88 | | dsat.push(u32::from_slice(&header[48..52])); [INFO] [stdout] | |________________________________________________________^ help: consider using the `vec![]` macro: `let dsat: std::vec::Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/header.rs:114:18 [INFO] [stdout] | [INFO] [stdout] 114 | if &header[68..72] != &super::constants::END_OF_CHAIN_SECID { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 114 - if &header[68..72] != &super::constants::END_OF_CHAIN_SECID { [INFO] [stdout] 114 + if header[68..72] != super::constants::END_OF_CHAIN_SECID { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/header.rs:174:8 [INFO] [stdout] | [INFO] [stdout] 174 | if !self.body.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.body.is_none()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/header.rs:179:51 [INFO] [stdout] | [INFO] [stdout] 179 | self.buf_reader.as_mut().unwrap().read_to_end(&mut [INFO] [stdout] | ___________________________________________________^ [INFO] [stdout] 180 | | buf).map_err(super::error::Error::IOError)?; [INFO] [stdout] | |_________^ help: change this to: `buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/header.rs:190:30 [INFO] [stdout] | [INFO] [stdout] 190 | while i < max_sec_ids && &buffer[offset .. offset + 4] [INFO] [stdout] | ______________________________^ [INFO] [stdout] 191 | | != &super::constants::FREE_SECID { [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 190 ~ while i < max_sec_ids && buffer[offset .. offset + 4] [INFO] [stdout] 191 ~ != super::constants::FREE_SECID { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `buf` [INFO] [stdout] --> src/util.rs:26:14 [INFO] [stdout] | [INFO] [stdout] 26 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 26 - for i in 0..buf.len() { [INFO] [stdout] 26 + for in &buf { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `p` is used as a loop counter [INFO] [stdout] --> src/util.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (p, i) in (0..buf.len()).enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `buf` [INFO] [stdout] --> src/util.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 38 - for i in 0..buf.len() { [INFO] [stdout] 38 + for in &buf { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `p` is used as a loop counter [INFO] [stdout] --> src/util.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (p, i) in (0..buf.len()).enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `buf` [INFO] [stdout] --> src/util.rs:50:14 [INFO] [stdout] | [INFO] [stdout] 50 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 50 - for i in 0..buf.len() { [INFO] [stdout] 50 + for in &buf { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `p` is used as a loop counter [INFO] [stdout] --> src/util.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (p, i) in (0..buf.len()).enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `buf` [INFO] [stdout] --> src/util.rs:62:14 [INFO] [stdout] | [INFO] [stdout] 62 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 62 - for i in 0..buf.len() { [INFO] [stdout] 62 + for in &buf { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `p` is used as a loop counter [INFO] [stdout] --> src/util.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (p, i) in (0..buf.len()).enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/sat.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | let result: Result<(), super::error::Error>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `result` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 24 ~ [INFO] [stdout] 25 | let mut sec_ids = vec![super::constants::FREE_SECID_U32; [INFO] [stdout] 26 | sector_size / 4]; [INFO] [stdout] 27 ~ let result: Result<(), super::error::Error> = if self.msat.as_ref().unwrap().len() == 0 { [INFO] [stdout] 28 ~ Err(super::error::Error::EmptyMasterSectorAllocationTable) [INFO] [stdout] 29 | } else { [INFO] [stdout] ... [INFO] [stdout] 36 | self.build_dsat()?; [INFO] [stdout] 37 ~ Ok(()) [INFO] [stdout] 38 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/sat.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | if self.msat.as_ref().unwrap().len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.msat.as_ref().unwrap().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/entry.rs:193:7 [INFO] [stdout] | [INFO] [stdout] 193 | i = i + 2; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Entry` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/entry.rs:226:3 [INFO] [stdout] | [INFO] [stdout] 226 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `EntrySlice` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/entry.rs:317:3 [INFO] [stdout] | [INFO] [stdout] 317 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/entry.rs:401:9 [INFO] [stdout] | [INFO] [stdout] 401 | k = k + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `k += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `entries` [INFO] [stdout] --> src/entry.rs:405:14 [INFO] [stdout] | [INFO] [stdout] 405 | for i in 0 .. entries.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 405 - for i in 0 .. entries.len() { [INFO] [stdout] 405 + for (i, ) in entries.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/entry.rs:442:19 [INFO] [stdout] | [INFO] [stdout] 442 | let start = ssector_index as usize * ssector_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `ssector_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `parent_id` after checking its variant with `is_some` [INFO] [stdout] --> src/entry.rs:474:40 [INFO] [stdout] | [INFO] [stdout] 473 | if parent_id.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = parent_id` [INFO] [stdout] 474 | self.entries.as_mut().unwrap()[parent_id.unwrap() as usize] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.body` after checking its variant with `is_some` [INFO] [stdout] --> src/sector.rs:28:19 [INFO] [stdout] | [INFO] [stdout] 27 | if self.body.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = &self.body` [INFO] [stdout] 28 | body_size = self.body.as_ref().unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/sector.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | let body_size: usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `body_size` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 26 ~ [INFO] [stdout] 27 ~ let body_size: usize = if self.body.is_some() { [INFO] [stdout] 28 ~ self.body.as_ref().unwrap().len() [INFO] [stdout] 29 | } else { [INFO] [stdout] 30 ~ 0 [INFO] [stdout] 31 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ole.rs:129:26 [INFO] [stdout] | [INFO] [stdout] 129 | pub fn from_path(path: &str) -> Result { [INFO] [stdout] | ^^^^ ^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 129 | pub fn from_path(path: &str) -> Result, super::error::Error> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ole.rs:147:18 [INFO] [stdout] | [INFO] [stdout] 147 | pub fn iterate(&self) -> super::iterator::OLEIterator { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 147 | pub fn iterate(&self) -> super::iterator::OLEIterator<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/entry.rs:368:26 [INFO] [stdout] | [INFO] [stdout] 368 | pub fn get_entry_slice(&self, entry: &Entry) -> [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] 369 | Result { [INFO] [stdout] | ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 369 | Result, super::error::Error> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/entry.rs:429:30 [INFO] [stdout] | [INFO] [stdout] 429 | fn get_short_stream_slices(&self, chain: &std::vec::Vec, size: usize) [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] 430 | -> Result { [INFO] [stdout] | ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 430 | -> Result, super::error::Error> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/entry.rs:450:24 [INFO] [stdout] | [INFO] [stdout] 450 | fn get_stream_slices(&self, chain: &std::vec::Vec, size: usize) [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] 451 | -> Result { [INFO] [stdout] | ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 451 | -> Result, super::error::Error> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.39s [INFO] running `Command { std: "docker" "inspect" "7a13d1074f61263e5922e9e782ba7c28db4aafe6b165355736972403e4b5c3e7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7a13d1074f61263e5922e9e782ba7c28db4aafe6b165355736972403e4b5c3e7", kill_on_drop: false }` [INFO] [stdout] 7a13d1074f61263e5922e9e782ba7c28db4aafe6b165355736972403e4b5c3e7