[INFO] fetching crate deaf 0.1.3... [INFO] linting deaf-0.1.3 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate deaf 0.1.3 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate deaf 0.1.3 [INFO] finished tweaking crates.io crate deaf 0.1.3 [INFO] tweaked toml for crates.io crate deaf 0.1.3 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate deaf 0.1.3 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 deaf 0.1.3 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] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded serial_test_derive v2.0.0 [INFO] [stderr] Downloaded serial_test v2.0.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 89cec03cbe967a79a2df8e335936b91f737fbeee6eaaa16209aeede950c12142 [INFO] running `Command { std: "docker" "start" "-a" "89cec03cbe967a79a2df8e335936b91f737fbeee6eaaa16209aeede950c12142", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "89cec03cbe967a79a2df8e335936b91f737fbeee6eaaa16209aeede950c12142", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "89cec03cbe967a79a2df8e335936b91f737fbeee6eaaa16209aeede950c12142", kill_on_drop: false }` [INFO] [stdout] 89cec03cbe967a79a2df8e335936b91f737fbeee6eaaa16209aeede950c12142 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] cf452713a9ccc70b66140f2dcd74cbb510526e1ecbb113d1775010088d486255 [INFO] running `Command { std: "docker" "start" "-a" "cf452713a9ccc70b66140f2dcd74cbb510526e1ecbb113d1775010088d486255", kill_on_drop: false }` [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling toml_datetime v0.6.8 [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Compiling once_cell v1.21.1 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking dashmap v5.5.3 [INFO] [stderr] Checking log v0.4.26 [INFO] [stderr] Compiling toml_edit v0.19.15 [INFO] [stderr] Compiling proc-macro-crate v1.3.1 [INFO] [stderr] Compiling num_enum_derive v0.5.11 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking num_enum v0.5.11 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling enumflags2_derive v0.7.11 [INFO] [stderr] Compiling serial_test_derive v2.0.0 [INFO] [stderr] Checking serial_test v2.0.0 [INFO] [stderr] Checking enumflags2 v0.7.11 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking deaf v0.1.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/common/iterator.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | data: data, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [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/common/iterator.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | delim: delim, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `delim` [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: redundant field names in struct initialization [INFO] [stdout] --> src/tables/table.rs:169:13 [INFO] [stdout] | [INFO] [stdout] 169 | section: section, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `section` [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: redundant field names in struct initialization [INFO] [stdout] --> src/section.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | header: header, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `header` [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: can be more succinctly written as a byte str [INFO] [stdout] --> src/common/bytes.rs:447:17 [INFO] [stdout] | [INFO] [stdout] 447 | let d = &[b'E', b'L', b'F']; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `b"ELF"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/common/iterator.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | data: data, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [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/common/iterator.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | delim: delim, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `delim` [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: can be more succinctly written as a byte str [INFO] [stdout] --> src/common/iterator.rs:129:34 [INFO] [stdout] | [INFO] [stdout] 129 | const NULL_TERM_STR: &[u8] = &[ [INFO] [stdout] | __________________________________^ [INFO] [stdout] 130 | | b'T',b'h',b'i',b's',b' ',b'i',b's',b' ',b'a',b' ',b't',b'e',b's',b't',b'\0', [INFO] [stdout] 131 | | b'A',b'n',b'o',b't',b'h',b'e',b'r',b' ',b't',b'e',b's',b't',b'\0', [INFO] [stdout] 132 | | ]; [INFO] [stdout] | |_____^ help: try: `b"This is a test\0Another test\0"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> src/common/iterator.rs:134:35 [INFO] [stdout] | [INFO] [stdout] 134 | const FIXED_LEN_DATA: &[u8] = &[ [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 135 | | b'T',b'h',b'i',b's',b' ',b'i',b's',b' ',b'a',b' ',b't',b'e',b's',b't', [INFO] [stdout] 136 | | b'T',b'h',b'i',b's',b' ',b'i',b's',b' ',b'a',b' ',b't',b'e',b's',b't', [INFO] [stdout] 137 | | ]; [INFO] [stdout] | |_____^ help: try: `b"This is a testThis is a test"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tables/table.rs:169:13 [INFO] [stdout] | [INFO] [stdout] 169 | section: section, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `section` [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: redundant field names in struct initialization [INFO] [stdout] --> src/section.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | header: header, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `header` [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/errors.rs:92:66 [INFO] [stdout] | [INFO] [stdout] 92 | Error::PoisonError(format!("std::sync::PoisonError: {}",e.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/errors.rs:101:72 [INFO] [stdout] | [INFO] [stdout] 101 | Error::FromPrimitiveError(format!("TryFromPrimitiveError: {}",e.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/common/ranges.rs:130:1 [INFO] [stdout] | [INFO] [stdout] 130 | impl Into> for &Ranges { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From<&common::ranges::Ranges>` [INFO] [stdout] | [INFO] [stdout] 130 ~ impl From<&Ranges> for Range { [INFO] [stdout] 131 ~ fn from(val: &Ranges) -> Self { [INFO] [stdout] 132 ~ val.get() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | Ok(b.copy_from_slice(self)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 117 ~ b.copy_from_slice(self); [INFO] [stdout] 118 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 129 ~ let _: () = into!(self, l, b); [INFO] [stdout] 130 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 141 ~ let _: () = into!(self, l, b); [INFO] [stdout] 142 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 153 ~ let _: () = into!(self, l, b); [INFO] [stdout] 154 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 165 ~ let _: () = into!(self, l, b); [INFO] [stdout] 166 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 177 ~ let _: () = into!(self, l, b); [INFO] [stdout] 178 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:189:9 [INFO] [stdout] | [INFO] [stdout] 189 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 189 ~ let _: () = into!(self, l, b); [INFO] [stdout] 190 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | Ok(b.copy_from_slice(&self.as_bytes())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 201 ~ b.copy_from_slice(&self.as_bytes()); [INFO] [stdout] 202 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/common/bytes.rs:201:30 [INFO] [stdout] | [INFO] [stdout] 201 | Ok(b.copy_from_slice(&self.as_bytes())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.as_bytes()` [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] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | Ok(b.copy_from_slice(&self.as_bytes_with_nul())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 213 ~ b.copy_from_slice(&self.as_bytes_with_nul()); [INFO] [stdout] 214 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/common/bytes.rs:213:30 [INFO] [stdout] | [INFO] [stdout] 213 | Ok(b.copy_from_slice(&self.as_bytes_with_nul())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.as_bytes_with_nul()` [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: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:238:46 [INFO] [stdout] | [INFO] [stdout] 238 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `Width` to `u8` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 238 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 238 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:242:46 [INFO] [stdout] | [INFO] [stdout] 242 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `Layout` to `u8` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 242 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 242 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:246:47 [INFO] [stdout] | [INFO] [stdout] 246 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `PHType` to `u32` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 246 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 246 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:250:47 [INFO] [stdout] | [INFO] [stdout] 250 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `SHType` to `u32` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 250 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 250 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u64` [INFO] [stdout] --> src/common/bytes.rs:258:42 [INFO] [stdout] | [INFO] [stdout] 258 | fn convert(self) -> Result { Ok(self.bits().try_into()?) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:262:47 [INFO] [stdout] | [INFO] [stdout] 262 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u8` to `u16` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 262 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 262 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:266:47 [INFO] [stdout] | [INFO] [stdout] 266 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u32` to `u64` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 266 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 266 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:270:49 [INFO] [stdout] | [INFO] [stdout] 270 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u16` to `usize` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 270 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 270 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:282:47 [INFO] [stdout] | [INFO] [stdout] 282 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `i32` to `i64` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 282 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 282 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:321:37 [INFO] [stdout] | [INFO] [stdout] 321 | Ok(BitFlags::from_bits(self.try_into()?)?) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u32` to `u64` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 321 - Ok(BitFlags::from_bits(self.try_into()?)?) [INFO] [stdout] 321 + Ok(BitFlags::from_bits(self.into()?)?) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/field.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | / Ok(match self.width() { [INFO] [stdout] 167 | | Width::X32 => self.set_x32(bytes,value)?, [INFO] [stdout] 168 | | Width::X64 => self.set_x64(bytes,value)?, [INFO] [stdout] 169 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 166 ~ let _: () = match self.width() { [INFO] [stdout] 167 + Width::X32 => self.set_x32(bytes,value)?, [INFO] [stdout] 168 + Width::X64 => self.set_x64(bytes,value)?, [INFO] [stdout] 169 + }; [INFO] [stdout] 170 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/common/update.rs:73:25 [INFO] [stdout] | [INFO] [stdout] 73 | .retain(|i| !i [INFO] [stdout] | _________________________^ [INFO] [stdout] 74 | | .downcast_ref::>() [INFO] [stdout] 75 | | .is_some()) [INFO] [stdout] | |__________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 73 ~ .retain(|i| i [INFO] [stdout] 74 ~ .downcast_ref::>().is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/common/update.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | / self.queue [INFO] [stdout] 95 | | .iter() [INFO] [stdout] 96 | | .count() [INFO] [stdout] | |____________________^ help: try: `self.queue.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/common/constants.rs:67:1 [INFO] [stdout] | [INFO] [stdout] 67 | / impl Default for PHType { [INFO] [stdout] 68 | | fn default() -> Self { Self::PT_NULL } [INFO] [stdout] 69 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 40 + #[derive(Default)] [INFO] [stdout] 41 | pub enum PHType { [INFO] [stdout] 42 ~ #[default] [INFO] [stdout] 43 ~ PT_NULL = 0x00000000, // Program header table entry unused. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/common/constants.rs:137:1 [INFO] [stdout] | [INFO] [stdout] 137 | / impl Default for SHType { [INFO] [stdout] 138 | | fn default() -> Self { Self::SHT_NULL } [INFO] [stdout] 139 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 103 + #[derive(Default)] [INFO] [stdout] 104 | pub enum SHType { [INFO] [stdout] 105 ~ #[default] [INFO] [stdout] 106 ~ SHT_NULL = 0x00000000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FileHeader` [INFO] [stdout] --> src/headers/file.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub fn new() -> Self { [INFO] [stdout] 38 | | Self { [INFO] [stdout] 39 | | layout: Layout::Little, [INFO] [stdout] 40 | | width: Width::X64, [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 32 + impl Default for FileHeader { [INFO] [stdout] 33 + fn default() -> Self { [INFO] [stdout] 34 + Self::new() [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/tables/info/relocation.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | Ok((self.symbol as u64) << 32 | self.kind as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.symbol` [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: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/tables/items/string.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | Ok(self.value.clone().into_string()?.into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.value.clone().into_string()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `TableView` has a `len` method but no (possibly inherited) `is_empty` method [INFO] [stdout] --> src/tables/table.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / pub trait TableView [INFO] [stdout] 25 | | where [INFO] [stdout] 26 | | T: TableItem + Default [INFO] [stdout] ... | [INFO] [stdout] 118 | | } [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tables/table.rs:233:34 [INFO] [stdout] | [INFO] [stdout] 233 | let item = T::parse(data,&self.section)?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.section` [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: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/section.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / (0..count) [INFO] [stdout] 58 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/binary.rs:39:41 [INFO] [stdout] | [INFO] [stdout] 39 | self.header = FileHeader::parse(&data)?; [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/binary.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | &data, [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/binary.rs:269:14 [INFO] [stdout] | [INFO] [stdout] 269 | .unwrap_or(Vec::new()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/binary.rs:266:9 [INFO] [stdout] | [INFO] [stdout] 266 | / self.section_for_address(address) [INFO] [stdout] 267 | | .and_then(|s| s.slice(s.offset().saturating_sub(address), size)) [INFO] [stdout] 268 | | .and_then(|d| Ok(d.to_vec())) [INFO] [stdout] | |_________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 266 ~ self.section_for_address(address) [INFO] [stdout] 267 + .and_then(|s| s.slice(s.offset().saturating_sub(address), size)).map(|d| d.to_vec()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `STType` which implements the `Copy` trait [INFO] [stdout] --> src/symbols/info.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | self.kind.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.kind` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `STBind` which implements the `Copy` trait [INFO] [stdout] --> src/symbols/info.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | self.bind.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.bind` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/symbols/info.rs:65:20 [INFO] [stdout] | [INFO] [stdout] 65 | let bind = STBind::try_from((v & BIND_MASK) >> BIND_SHIFT)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u8` to `STBind` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 65 - let bind = STBind::try_from((v & BIND_MASK) >> BIND_SHIFT)?; [INFO] [stdout] 65 + let bind = From::from((v & BIND_MASK) >> BIND_SHIFT)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/symbols/info.rs:66:20 [INFO] [stdout] | [INFO] [stdout] 66 | let kind = STType::try_from((v & TYPE_MASK) >> TYPE_SHIFT)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u8` to `STType` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 66 - let kind = STType::try_from((v & TYPE_MASK) >> TYPE_SHIFT)?; [INFO] [stdout] 66 + let kind = From::from((v & TYPE_MASK) >> TYPE_SHIFT)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/symbols/symbol.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | STVisibility::try_from(self.other())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u8` to `STVisibility` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 283 - STVisibility::try_from(self.other())?; [INFO] [stdout] 283 + From::from(self.other())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/tables/table.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | fn iterator(&self) -> ByteIter { [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] 37 | fn iterator(&self) -> ByteIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/binary.rs:168:26 [INFO] [stdout] | [INFO] [stdout] 168 | pub fn string_tables(&self) -> Vec { [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] 168 | pub fn string_tables(&self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/binary.rs:179:26 [INFO] [stdout] | [INFO] [stdout] 179 | pub fn symbol_tables(&self) -> Vec { [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] 179 | pub fn symbol_tables(&self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/binary.rs:186:30 [INFO] [stdout] | [INFO] [stdout] 186 | pub fn symbol_tables_mut(&mut self) -> Vec { [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] 186 | pub fn symbol_tables_mut(&mut self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/errors.rs:92:66 [INFO] [stdout] | [INFO] [stdout] 92 | Error::PoisonError(format!("std::sync::PoisonError: {}",e.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/errors.rs:101:72 [INFO] [stdout] | [INFO] [stdout] 101 | Error::FromPrimitiveError(format!("TryFromPrimitiveError: {}",e.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/common/ranges.rs:130:1 [INFO] [stdout] | [INFO] [stdout] 130 | impl Into> for &Ranges { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From<&common::ranges::Ranges>` [INFO] [stdout] | [INFO] [stdout] 130 ~ impl From<&Ranges> for Range { [INFO] [stdout] 131 ~ fn from(val: &Ranges) -> Self { [INFO] [stdout] 132 ~ val.get() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | Ok(b.copy_from_slice(self)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 117 ~ b.copy_from_slice(self); [INFO] [stdout] 118 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 129 ~ let _: () = into!(self, l, b); [INFO] [stdout] 130 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 141 ~ let _: () = into!(self, l, b); [INFO] [stdout] 142 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 153 ~ let _: () = into!(self, l, b); [INFO] [stdout] 154 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 165 ~ let _: () = into!(self, l, b); [INFO] [stdout] 166 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 177 ~ let _: () = into!(self, l, b); [INFO] [stdout] 178 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:189:9 [INFO] [stdout] | [INFO] [stdout] 189 | Ok(into!(self, l, b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 189 ~ let _: () = into!(self, l, b); [INFO] [stdout] 190 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | Ok(b.copy_from_slice(&self.as_bytes())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 201 ~ b.copy_from_slice(&self.as_bytes()); [INFO] [stdout] 202 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/common/bytes.rs:201:30 [INFO] [stdout] | [INFO] [stdout] 201 | Ok(b.copy_from_slice(&self.as_bytes())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.as_bytes()` [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] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/bytes.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | Ok(b.copy_from_slice(&self.as_bytes_with_nul())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 213 ~ b.copy_from_slice(&self.as_bytes_with_nul()); [INFO] [stdout] 214 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/common/bytes.rs:213:30 [INFO] [stdout] | [INFO] [stdout] 213 | Ok(b.copy_from_slice(&self.as_bytes_with_nul())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.as_bytes_with_nul()` [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: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:238:46 [INFO] [stdout] | [INFO] [stdout] 238 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `Width` to `u8` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 238 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 238 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:242:46 [INFO] [stdout] | [INFO] [stdout] 242 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `Layout` to `u8` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 242 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 242 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:246:47 [INFO] [stdout] | [INFO] [stdout] 246 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `PHType` to `u32` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 246 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 246 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:250:47 [INFO] [stdout] | [INFO] [stdout] 250 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `SHType` to `u32` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 250 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 250 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u64` [INFO] [stdout] --> src/common/bytes.rs:258:42 [INFO] [stdout] | [INFO] [stdout] 258 | fn convert(self) -> Result { Ok(self.bits().try_into()?) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:262:47 [INFO] [stdout] | [INFO] [stdout] 262 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u8` to `u16` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 262 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 262 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:266:47 [INFO] [stdout] | [INFO] [stdout] 266 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u32` to `u64` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 266 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 266 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:270:49 [INFO] [stdout] | [INFO] [stdout] 270 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u16` to `usize` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 270 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 270 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:282:47 [INFO] [stdout] | [INFO] [stdout] 282 | fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `i32` to `i64` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 282 - fn convert(self) -> Result { Ok(self.try_into()?) } [INFO] [stdout] 282 + fn convert(self) -> Result { Ok(self.into()?) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/common/bytes.rs:321:37 [INFO] [stdout] | [INFO] [stdout] 321 | Ok(BitFlags::from_bits(self.try_into()?)?) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u32` to `u64` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 321 - Ok(BitFlags::from_bits(self.try_into()?)?) [INFO] [stdout] 321 + Ok(BitFlags::from_bits(self.into()?)?) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/common/field.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | / Ok(match self.width() { [INFO] [stdout] 167 | | Width::X32 => self.set_x32(bytes,value)?, [INFO] [stdout] 168 | | Width::X64 => self.set_x64(bytes,value)?, [INFO] [stdout] 169 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 166 ~ let _: () = match self.width() { [INFO] [stdout] 167 + Width::X32 => self.set_x32(bytes,value)?, [INFO] [stdout] 168 + Width::X64 => self.set_x64(bytes,value)?, [INFO] [stdout] 169 + }; [INFO] [stdout] 170 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/common/update.rs:73:25 [INFO] [stdout] | [INFO] [stdout] 73 | .retain(|i| !i [INFO] [stdout] | _________________________^ [INFO] [stdout] 74 | | .downcast_ref::>() [INFO] [stdout] 75 | | .is_some()) [INFO] [stdout] | |__________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 73 ~ .retain(|i| i [INFO] [stdout] 74 ~ .downcast_ref::>().is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/common/update.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | / self.queue [INFO] [stdout] 95 | | .iter() [INFO] [stdout] 96 | | .count() [INFO] [stdout] | |____________________^ help: try: `self.queue.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/common/constants.rs:67:1 [INFO] [stdout] | [INFO] [stdout] 67 | / impl Default for PHType { [INFO] [stdout] 68 | | fn default() -> Self { Self::PT_NULL } [INFO] [stdout] 69 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 40 + #[derive(Default)] [INFO] [stdout] 41 | pub enum PHType { [INFO] [stdout] 42 ~ #[default] [INFO] [stdout] 43 ~ PT_NULL = 0x00000000, // Program header table entry unused. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/common/constants.rs:137:1 [INFO] [stdout] | [INFO] [stdout] 137 | / impl Default for SHType { [INFO] [stdout] 138 | | fn default() -> Self { Self::SHT_NULL } [INFO] [stdout] 139 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 103 + #[derive(Default)] [INFO] [stdout] 104 | pub enum SHType { [INFO] [stdout] 105 ~ #[default] [INFO] [stdout] 106 ~ SHT_NULL = 0x00000000, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FileHeader` [INFO] [stdout] --> src/headers/file.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub fn new() -> Self { [INFO] [stdout] 38 | | Self { [INFO] [stdout] 39 | | layout: Layout::Little, [INFO] [stdout] 40 | | width: Width::X64, [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 32 + impl Default for FileHeader { [INFO] [stdout] 33 + fn default() -> Self { [INFO] [stdout] 34 + Self::new() [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/headers/file.rs:431:35 [INFO] [stdout] | [INFO] [stdout] 431 | let mut buffer: Vec = vec![]; [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 432 | | buffer.resize(header.size(),0x00); [INFO] [stdout] | |_________________________________________^ help: consider replacing this with: `vec![0; header.size()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/headers/file.rs:454:35 [INFO] [stdout] | [INFO] [stdout] 454 | let mut buffer: Vec = vec![]; [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 455 | | buffer.resize(header.size(),0x00); [INFO] [stdout] | |_________________________________________^ help: consider replacing this with: `vec![0; header.size()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/headers/program.rs:316:35 [INFO] [stdout] | [INFO] [stdout] 316 | let mut buffer: Vec = vec![]; [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 317 | | buffer.resize(header.size(),0x00); [INFO] [stdout] | |_________________________________________^ help: consider replacing this with: `vec![0; header.size()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/headers/program.rs:362:35 [INFO] [stdout] | [INFO] [stdout] 362 | let mut buffer: Vec = vec![]; [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 363 | | buffer.resize(header.size(),0x00); [INFO] [stdout] | |_________________________________________^ help: consider replacing this with: `vec![0; header.size()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/headers/section.rs:407:35 [INFO] [stdout] | [INFO] [stdout] 407 | let mut buffer: Vec = vec![]; [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 408 | | buffer.resize(header.size(),0x00); [INFO] [stdout] | |_________________________________________^ help: consider replacing this with: `vec![0; header.size()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/headers/section.rs:453:35 [INFO] [stdout] | [INFO] [stdout] 453 | let mut buffer: Vec = vec![]; [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 454 | | buffer.resize(header.size(),0x00); [INFO] [stdout] | |_________________________________________^ help: consider replacing this with: `vec![0; header.size()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/tables/info/relocation.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | Ok((self.symbol as u64) << 32 | self.kind as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.symbol` [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: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/tables/items/string.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | Ok(self.value.clone().into_string()?.into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.value.clone().into_string()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `TableView` has a `len` method but no (possibly inherited) `is_empty` method [INFO] [stdout] --> src/tables/table.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / pub trait TableView [INFO] [stdout] 25 | | where [INFO] [stdout] 26 | | T: TableItem + Default [INFO] [stdout] ... | [INFO] [stdout] 118 | | } [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tables/table.rs:233:34 [INFO] [stdout] | [INFO] [stdout] 233 | let item = T::parse(data,&self.section)?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.section` [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: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/section.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / (0..count) [INFO] [stdout] 58 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/binary.rs:39:41 [INFO] [stdout] | [INFO] [stdout] 39 | self.header = FileHeader::parse(&data)?; [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/binary.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | &data, [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/binary.rs:269:14 [INFO] [stdout] | [INFO] [stdout] 269 | .unwrap_or(Vec::new()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/binary.rs:266:9 [INFO] [stdout] | [INFO] [stdout] 266 | / self.section_for_address(address) [INFO] [stdout] 267 | | .and_then(|s| s.slice(s.offset().saturating_sub(address), size)) [INFO] [stdout] 268 | | .and_then(|d| Ok(d.to_vec())) [INFO] [stdout] | |_________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 266 ~ self.section_for_address(address) [INFO] [stdout] 267 + .and_then(|s| s.slice(s.offset().saturating_sub(address), size)).map(|d| d.to_vec()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `STType` which implements the `Copy` trait [INFO] [stdout] --> src/symbols/info.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | self.kind.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.kind` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `STBind` which implements the `Copy` trait [INFO] [stdout] --> src/symbols/info.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | self.bind.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.bind` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/symbols/info.rs:65:20 [INFO] [stdout] | [INFO] [stdout] 65 | let bind = STBind::try_from((v & BIND_MASK) >> BIND_SHIFT)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u8` to `STBind` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 65 - let bind = STBind::try_from((v & BIND_MASK) >> BIND_SHIFT)?; [INFO] [stdout] 65 + let bind = From::from((v & BIND_MASK) >> BIND_SHIFT)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/symbols/info.rs:66:20 [INFO] [stdout] | [INFO] [stdout] 66 | let kind = STType::try_from((v & TYPE_MASK) >> TYPE_SHIFT)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u8` to `STType` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 66 - let kind = STType::try_from((v & TYPE_MASK) >> TYPE_SHIFT)?; [INFO] [stdout] 66 + let kind = From::from((v & TYPE_MASK) >> TYPE_SHIFT)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/symbols/symbol.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | STVisibility::try_from(self.other())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `u8` to `STVisibility` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 283 - STVisibility::try_from(self.other())?; [INFO] [stdout] 283 + From::from(self.other())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/tables/table.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | fn iterator(&self) -> ByteIter { [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] 37 | fn iterator(&self) -> ByteIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/binary.rs:168:26 [INFO] [stdout] | [INFO] [stdout] 168 | pub fn string_tables(&self) -> Vec { [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] 168 | pub fn string_tables(&self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/binary.rs:179:26 [INFO] [stdout] | [INFO] [stdout] 179 | pub fn symbol_tables(&self) -> Vec { [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] 179 | pub fn symbol_tables(&self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/binary.rs:186:30 [INFO] [stdout] | [INFO] [stdout] 186 | pub fn symbol_tables_mut(&mut self) -> Vec { [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] 186 | pub fn symbol_tables_mut(&mut self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 19.34s [INFO] running `Command { std: "docker" "inspect" "cf452713a9ccc70b66140f2dcd74cbb510526e1ecbb113d1775010088d486255", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cf452713a9ccc70b66140f2dcd74cbb510526e1ecbb113d1775010088d486255", kill_on_drop: false }` [INFO] [stdout] cf452713a9ccc70b66140f2dcd74cbb510526e1ecbb113d1775010088d486255