[INFO] cloning repository https://github.com/azamaulanaaa/win-mem [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/azamaulanaaa/win-mem" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fazamaulanaaa%2Fwin-mem", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fazamaulanaaa%2Fwin-mem'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] be17d3de67e4a2d51a1e18f39f28550801accd8f [INFO] linting azamaulanaaa/win-mem/be17d3de67e4a2d51a1e18f39f28550801accd8f against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fazamaulanaaa%2Fwin-mem" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/azamaulanaaa/win-mem [INFO] finished tweaking git repo https://github.com/azamaulanaaa/win-mem [INFO] tweaked toml for git repo https://github.com/azamaulanaaa/win-mem written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/azamaulanaaa/win-mem 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 git repo https://github.com/azamaulanaaa/win-mem already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 51e7f7228a2e7fe9b3a0a3038eec8b84d663f7b1c4a578399e5ffcdcfed0a766 [INFO] running `Command { std: "docker" "start" "-a" "51e7f7228a2e7fe9b3a0a3038eec8b84d663f7b1c4a578399e5ffcdcfed0a766", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "51e7f7228a2e7fe9b3a0a3038eec8b84d663f7b1c4a578399e5ffcdcfed0a766", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "51e7f7228a2e7fe9b3a0a3038eec8b84d663f7b1c4a578399e5ffcdcfed0a766", kill_on_drop: false }` [INFO] [stdout] 51e7f7228a2e7fe9b3a0a3038eec8b84d663f7b1c4a578399e5ffcdcfed0a766 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] f8836ee812c27bb1dc168c0c0d47621653e96f3b9afccf1038c36642fe4a0fc0 [INFO] running `Command { std: "docker" "start" "-a" "f8836ee812c27bb1dc168c0c0d47621653e96f3b9afccf1038c36642fe4a0fc0", kill_on_drop: false }` [INFO] [stderr] Checking bitflags v2.6.0 [INFO] [stderr] Compiling syn v2.0.68 [INFO] [stderr] Checking windows-result v0.1.2 [INFO] [stderr] Compiling windows-interface v0.57.0 [INFO] [stderr] Compiling windows-implement v0.57.0 [INFO] [stderr] Checking windows-core v0.57.0 [INFO] [stderr] Checking windows v0.57.0 [INFO] [stderr] Checking winmem v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: value assigned to `h` is never read [INFO] [stdout] --> src/handle.rs:99:33 [INFO] [stdout] | [INFO] [stdout] 99 | let mut h: HANDLE = HANDLE(0); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [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/handle.rs:35:1 [INFO] [stdout] | [INFO] [stdout] 35 | impl Into for HandleSnapshotFlag { [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` [INFO] [stdout] | [INFO] [stdout] 35 ~ impl From for CREATE_TOOLHELP_SNAPSHOT_FLAGS { [INFO] [stdout] 36 ~ fn from(val: HandleSnapshotFlag) -> Self { [INFO] [stdout] 37 ~ CREATE_TOOLHELP_SNAPSHOT_FLAGS(val.bits()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handle.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | return Ok(new_handle); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 60 - return Ok(new_handle); [INFO] [stdout] 60 + Ok(new_handle) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handle.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | / return Ok(Self { [INFO] [stdout] 117 | | raw: h, [INFO] [stdout] 118 | | process_id: value, [INFO] [stdout] 119 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 ~ Ok(Self { [INFO] [stdout] 117 + raw: h, [INFO] [stdout] 118 + process_id: value, [INFO] [stdout] 119 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handle.rs:197:17 [INFO] [stdout] | [INFO] [stdout] 197 | return Some(Module::from(module_entry_32w)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 197 - return Some(Module::from(module_entry_32w)); [INFO] [stdout] 197 + Some(Module::from(module_entry_32w)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handle.rs:200:17 [INFO] [stdout] | [INFO] [stdout] 200 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 200 - return None; [INFO] [stdout] 200 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/memory.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | return Ok(n); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 50 - return Ok(n); [INFO] [stdout] 50 + Ok(n) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/memory.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / let _ = unsafe { [INFO] [stdout] 34 | | ReadProcessMemory( [INFO] [stdout] 35 | | **self.handle, [INFO] [stdout] 36 | | self.current_address as *const _, [INFO] [stdout] ... | [INFO] [stdout] 42 | | .map_err(|_| ErrorKind::Other)?; [INFO] [stdout] | |________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 33 - let _ = unsafe { [INFO] [stdout] 33 + unsafe { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/memory.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | return Ok(n); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 74 - return Ok(n); [INFO] [stdout] 74 + Ok(n) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/memory.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / let _ = unsafe { [INFO] [stdout] 58 | | WriteProcessMemory( [INFO] [stdout] 59 | | **self.handle, [INFO] [stdout] 60 | | self.current_address as *const _, [INFO] [stdout] ... | [INFO] [stdout] 66 | | .map_err(|_| ErrorKind::Other)?; [INFO] [stdout] | |________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 57 - let _ = unsafe { [INFO] [stdout] 57 + unsafe { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/memory.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | / return match pos { [INFO] [stdout] 85 | | SeekFrom::Start(value) => { [INFO] [stdout] 86 | | self.current_address = usize::checked_add( [INFO] [stdout] 87 | | self.start_address, [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#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 84 ~ match pos { [INFO] [stdout] 85 + SeekFrom::Start(value) => { [INFO] [stdout] 86 + self.current_address = usize::checked_add( [INFO] [stdout] 87 + self.start_address, [INFO] [stdout] 88 + usize::try_from(value).map_err(|_| ErrorKind::InvalidData)?, [INFO] [stdout] 89 + ) [INFO] [stdout] 90 + .ok_or(ErrorKind::InvalidData)?; [INFO] [stdout] 91 + Ok(self.current_address as u64) [INFO] [stdout] 92 + } [INFO] [stdout] 93 + SeekFrom::Current(value) => { [INFO] [stdout] 94 + if value > 0 { [INFO] [stdout] 95 + self.current_address = usize::checked_add( [INFO] [stdout] 96 + self.current_address, [INFO] [stdout] 97 + usize::try_from(value).map_err(|_| ErrorKind::InvalidData)?, [INFO] [stdout] 98 + ) [INFO] [stdout] 99 + .ok_or(ErrorKind::InvalidData)?; [INFO] [stdout] 100 + Ok(self.current_address as u64) [INFO] [stdout] 101 + } else { [INFO] [stdout] 102 + self.current_address = usize::checked_sub( [INFO] [stdout] 103 + self.current_address, [INFO] [stdout] 104 + usize::try_from(-value).map_err(|_| ErrorKind::InvalidData)?, [INFO] [stdout] 105 + ) [INFO] [stdout] 106 + .ok_or(ErrorKind::InvalidData)?; [INFO] [stdout] 107 + Ok(self.current_address as u64) [INFO] [stdout] 108 + } [INFO] [stdout] 109 + } [INFO] [stdout] 110 + SeekFrom::End(value) => { [INFO] [stdout] 111 + self.current_address = usize::checked_sub( [INFO] [stdout] 112 + self.end_address, [INFO] [stdout] 113 + usize::try_from(-value).map_err(|_| ErrorKind::InvalidData)?, [INFO] [stdout] 114 + ) [INFO] [stdout] 115 + .ok_or(ErrorKind::InvalidData)?; [INFO] [stdout] 116 + Ok(self.current_address as u64) [INFO] [stdout] 117 + } [INFO] [stdout] 118 ~ } [INFO] [stdout] | [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/memory.rs:142:1 [INFO] [stdout] | [INFO] [stdout] 142 | impl Into for PageProtectionFlags { [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] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 142 ~ impl From for PAGE_PROTECTION_FLAGS { [INFO] [stdout] 143 ~ fn from(val: PageProtectionFlags) -> Self { [INFO] [stdout] 144 ~ PAGE_PROTECTION_FLAGS(val.bits()) [INFO] [stdout] | [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/memory.rs:165:1 [INFO] [stdout] | [INFO] [stdout] 165 | impl Into for VirtualAllocationType { [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] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 165 ~ impl From for VIRTUAL_ALLOCATION_TYPE { [INFO] [stdout] 166 ~ fn from(val: VirtualAllocationType) -> Self { [INFO] [stdout] 167 ~ VIRTUAL_ALLOCATION_TYPE(val.bits()) [INFO] [stdout] | [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/memory.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | impl Into for PageType { [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] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 188 ~ impl From for PAGE_TYPE { [INFO] [stdout] 189 ~ fn from(val: PageType) -> Self { [INFO] [stdout] 190 ~ PAGE_TYPE(val.bits()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/patch.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn apply<'b, const N: usize, const M: usize, const K: usize>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/patch.rs:91:46 [INFO] [stdout] | [INFO] [stdout] 91 | let mut data = vec![0u8; address_range.1 as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `address_range.1` [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: value assigned to `h` is never read [INFO] [stdout] --> src/handle.rs:99:33 [INFO] [stdout] | [INFO] [stdout] 99 | let mut h: HANDLE = HANDLE(0); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/patch.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | / match offsets { [INFO] [stdout] 114 | | Some(offsets) => { [INFO] [stdout] 115 | | let mut data = Vec::from(0usize.to_ne_bytes()); [INFO] [stdout] ... | [INFO] [stdout] 122 | | None => (), [INFO] [stdout] 123 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 113 ~ if let Some(offsets) = offsets { [INFO] [stdout] 114 + let mut data = Vec::from(0usize.to_ne_bytes()); [INFO] [stdout] 115 + [INFO] [stdout] 116 + for offset in offsets { [INFO] [stdout] 117 + let _ = self.read(addr, &mut data); [INFO] [stdout] 118 + addr = usize::from_ne_bytes(*data.as_slice().first_chunk().unwrap()) + offset; [INFO] [stdout] 119 + } [INFO] [stdout] 120 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pattern.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 38 - return true; [INFO] [stdout] 38 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/pattern.rs:26:24 [INFO] [stdout] | [INFO] [stdout] 26 | if other.get(index).map_or(true, |e| e != value) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use a standard comparison instead [INFO] [stdout] | [INFO] [stdout] 26 - if other.get(index).map_or(true, |e| e != value) { [INFO] [stdout] 26 + if other.get(index) != Some(value) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pattern.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 61 - return true; [INFO] [stdout] 61 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/pattern.rs:53:24 [INFO] [stdout] | [INFO] [stdout] 53 | if other.get(index).map_or(true, |e| e != value) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use a standard comparison instead [INFO] [stdout] | [INFO] [stdout] 53 - if other.get(index).map_or(true, |e| e != value) { [INFO] [stdout] 53 + if other.get(index) != Some(value) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for a struct [INFO] [stdout] --> src/handle.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | / bitflags! { [INFO] [stdout] 23 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 24 | | pub struct HandleSnapshotFlag: u32 { [INFO] [stdout] 25 | | const Inherit = 0x80000000; [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:1:9 [INFO] [stdout] | [INFO] [stdout] 1 | #![warn(missing_docs)] [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] = note: this warning originates in the macro `$crate::__declare_public_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for an associated constant [INFO] [stdout] --> src/handle.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | / bitflags! { [INFO] [stdout] 23 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 24 | | pub struct HandleSnapshotFlag: u32 { [INFO] [stdout] 25 | | const Inherit = 0x80000000; [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__impl_public_bitflags_consts` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/handle.rs:64:42 [INFO] [stdout] | [INFO] [stdout] 64 | pub fn get_memory_basic_informations(&self) -> HandleMemoryBasicInformationIter { [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] 64 | pub fn get_memory_basic_informations(&self) -> HandleMemoryBasicInformationIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/handle.rs:136:24 [INFO] [stdout] | [INFO] [stdout] 136 | pub fn get_modules(&self) -> HandleSnapshotModuleIter { [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] 136 | pub fn get_modules(&self) -> HandleSnapshotModuleIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for an associated function [INFO] [stdout] --> src/memory.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn new(handle: &'a Handle, start_address: usize, end_address: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for a struct [INFO] [stdout] --> src/memory.rs:122:1 [INFO] [stdout] | [INFO] [stdout] 122 | / bitflags! { [INFO] [stdout] 123 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 124 | | pub struct PageProtectionFlags: u32 { [INFO] [stdout] 125 | | const Execute = 0x10; [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__declare_public_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for an associated constant [INFO] [stdout] --> src/memory.rs:122:1 [INFO] [stdout] | [INFO] [stdout] 122 | / bitflags! { [INFO] [stdout] 123 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 124 | | pub struct PageProtectionFlags: u32 { [INFO] [stdout] 125 | | const Execute = 0x10; [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__impl_public_bitflags_consts` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for a struct [INFO] [stdout] --> src/memory.rs:156:1 [INFO] [stdout] | [INFO] [stdout] 156 | / bitflags! { [INFO] [stdout] 157 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 158 | | pub struct VirtualAllocationType: u32 { [INFO] [stdout] 159 | | const Commit = 0x1000; [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__declare_public_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for an associated constant [INFO] [stdout] --> src/memory.rs:156:1 [INFO] [stdout] | [INFO] [stdout] 156 | / bitflags! { [INFO] [stdout] 157 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 158 | | pub struct VirtualAllocationType: u32 { [INFO] [stdout] 159 | | const Commit = 0x1000; [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__impl_public_bitflags_consts` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for a struct [INFO] [stdout] --> src/memory.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | / bitflags! { [INFO] [stdout] 180 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 181 | | pub struct PageType: u32 { [INFO] [stdout] 182 | | const Image = 0x1000000; [INFO] [stdout] ... | [INFO] [stdout] 186 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__declare_public_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for an associated constant [INFO] [stdout] --> src/memory.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | / bitflags! { [INFO] [stdout] 180 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 181 | | pub struct PageType: u32 { [INFO] [stdout] 182 | | const Image = 0x1000000; [INFO] [stdout] ... | [INFO] [stdout] 186 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__impl_public_bitflags_consts` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [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/handle.rs:35:1 [INFO] [stdout] | [INFO] [stdout] 35 | impl Into for HandleSnapshotFlag { [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` [INFO] [stdout] | [INFO] [stdout] 35 ~ impl From for CREATE_TOOLHELP_SNAPSHOT_FLAGS { [INFO] [stdout] 36 ~ fn from(val: HandleSnapshotFlag) -> Self { [INFO] [stdout] 37 ~ CREATE_TOOLHELP_SNAPSHOT_FLAGS(val.bits()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handle.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | return Ok(new_handle); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 60 - return Ok(new_handle); [INFO] [stdout] 60 + Ok(new_handle) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handle.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | / return Ok(Self { [INFO] [stdout] 117 | | raw: h, [INFO] [stdout] 118 | | process_id: value, [INFO] [stdout] 119 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 ~ Ok(Self { [INFO] [stdout] 117 + raw: h, [INFO] [stdout] 118 + process_id: value, [INFO] [stdout] 119 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handle.rs:197:17 [INFO] [stdout] | [INFO] [stdout] 197 | return Some(Module::from(module_entry_32w)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 197 - return Some(Module::from(module_entry_32w)); [INFO] [stdout] 197 + Some(Module::from(module_entry_32w)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/handle.rs:200:17 [INFO] [stdout] | [INFO] [stdout] 200 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 200 - return None; [INFO] [stdout] 200 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/memory.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | return Ok(n); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 50 - return Ok(n); [INFO] [stdout] 50 + Ok(n) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/memory.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / let _ = unsafe { [INFO] [stdout] 34 | | ReadProcessMemory( [INFO] [stdout] 35 | | **self.handle, [INFO] [stdout] 36 | | self.current_address as *const _, [INFO] [stdout] ... | [INFO] [stdout] 42 | | .map_err(|_| ErrorKind::Other)?; [INFO] [stdout] | |________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 33 - let _ = unsafe { [INFO] [stdout] 33 + unsafe { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/memory.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | return Ok(n); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 74 - return Ok(n); [INFO] [stdout] 74 + Ok(n) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/memory.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / let _ = unsafe { [INFO] [stdout] 58 | | WriteProcessMemory( [INFO] [stdout] 59 | | **self.handle, [INFO] [stdout] 60 | | self.current_address as *const _, [INFO] [stdout] ... | [INFO] [stdout] 66 | | .map_err(|_| ErrorKind::Other)?; [INFO] [stdout] | |________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 57 - let _ = unsafe { [INFO] [stdout] 57 + unsafe { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/memory.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | / return match pos { [INFO] [stdout] 85 | | SeekFrom::Start(value) => { [INFO] [stdout] 86 | | self.current_address = usize::checked_add( [INFO] [stdout] 87 | | self.start_address, [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#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 84 ~ match pos { [INFO] [stdout] 85 + SeekFrom::Start(value) => { [INFO] [stdout] 86 + self.current_address = usize::checked_add( [INFO] [stdout] 87 + self.start_address, [INFO] [stdout] 88 + usize::try_from(value).map_err(|_| ErrorKind::InvalidData)?, [INFO] [stdout] 89 + ) [INFO] [stdout] 90 + .ok_or(ErrorKind::InvalidData)?; [INFO] [stdout] 91 + Ok(self.current_address as u64) [INFO] [stdout] 92 + } [INFO] [stdout] 93 + SeekFrom::Current(value) => { [INFO] [stdout] 94 + if value > 0 { [INFO] [stdout] 95 + self.current_address = usize::checked_add( [INFO] [stdout] 96 + self.current_address, [INFO] [stdout] 97 + usize::try_from(value).map_err(|_| ErrorKind::InvalidData)?, [INFO] [stdout] 98 + ) [INFO] [stdout] 99 + .ok_or(ErrorKind::InvalidData)?; [INFO] [stdout] 100 + Ok(self.current_address as u64) [INFO] [stdout] 101 + } else { [INFO] [stdout] 102 + self.current_address = usize::checked_sub( [INFO] [stdout] 103 + self.current_address, [INFO] [stdout] 104 + usize::try_from(-value).map_err(|_| ErrorKind::InvalidData)?, [INFO] [stdout] 105 + ) [INFO] [stdout] 106 + .ok_or(ErrorKind::InvalidData)?; [INFO] [stdout] 107 + Ok(self.current_address as u64) [INFO] [stdout] 108 + } [INFO] [stdout] 109 + } [INFO] [stdout] 110 + SeekFrom::End(value) => { [INFO] [stdout] 111 + self.current_address = usize::checked_sub( [INFO] [stdout] 112 + self.end_address, [INFO] [stdout] 113 + usize::try_from(-value).map_err(|_| ErrorKind::InvalidData)?, [INFO] [stdout] 114 + ) [INFO] [stdout] 115 + .ok_or(ErrorKind::InvalidData)?; [INFO] [stdout] 116 + Ok(self.current_address as u64) [INFO] [stdout] 117 + } [INFO] [stdout] 118 ~ } [INFO] [stdout] | [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/memory.rs:142:1 [INFO] [stdout] | [INFO] [stdout] 142 | impl Into for PageProtectionFlags { [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] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 142 ~ impl From for PAGE_PROTECTION_FLAGS { [INFO] [stdout] 143 ~ fn from(val: PageProtectionFlags) -> Self { [INFO] [stdout] 144 ~ PAGE_PROTECTION_FLAGS(val.bits()) [INFO] [stdout] | [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/memory.rs:165:1 [INFO] [stdout] | [INFO] [stdout] 165 | impl Into for VirtualAllocationType { [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] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 165 ~ impl From for VIRTUAL_ALLOCATION_TYPE { [INFO] [stdout] 166 ~ fn from(val: VirtualAllocationType) -> Self { [INFO] [stdout] 167 ~ VIRTUAL_ALLOCATION_TYPE(val.bits()) [INFO] [stdout] | [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/memory.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | impl Into for PageType { [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] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 188 ~ impl From for PAGE_TYPE { [INFO] [stdout] 189 ~ fn from(val: PageType) -> Self { [INFO] [stdout] 190 ~ PAGE_TYPE(val.bits()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/patch.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn apply<'b, const N: usize, const M: usize, const K: usize>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/patch.rs:91:46 [INFO] [stdout] | [INFO] [stdout] 91 | let mut data = vec![0u8; address_range.1 as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `address_range.1` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/patch.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | / match offsets { [INFO] [stdout] 114 | | Some(offsets) => { [INFO] [stdout] 115 | | let mut data = Vec::from(0usize.to_ne_bytes()); [INFO] [stdout] ... | [INFO] [stdout] 122 | | None => (), [INFO] [stdout] 123 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 113 ~ if let Some(offsets) = offsets { [INFO] [stdout] 114 + let mut data = Vec::from(0usize.to_ne_bytes()); [INFO] [stdout] 115 + [INFO] [stdout] 116 + for offset in offsets { [INFO] [stdout] 117 + let _ = self.read(addr, &mut data); [INFO] [stdout] 118 + addr = usize::from_ne_bytes(*data.as_slice().first_chunk().unwrap()) + offset; [INFO] [stdout] 119 + } [INFO] [stdout] 120 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pattern.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 38 - return true; [INFO] [stdout] 38 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/pattern.rs:26:24 [INFO] [stdout] | [INFO] [stdout] 26 | if other.get(index).map_or(true, |e| e != value) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use a standard comparison instead [INFO] [stdout] | [INFO] [stdout] 26 - if other.get(index).map_or(true, |e| e != value) { [INFO] [stdout] 26 + if other.get(index) != Some(value) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pattern.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 61 - return true; [INFO] [stdout] 61 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/pattern.rs:53:24 [INFO] [stdout] | [INFO] [stdout] 53 | if other.get(index).map_or(true, |e| e != value) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use a standard comparison instead [INFO] [stdout] | [INFO] [stdout] 53 - if other.get(index).map_or(true, |e| e != value) { [INFO] [stdout] 53 + if other.get(index) != Some(value) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for a struct [INFO] [stdout] --> src/handle.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | / bitflags! { [INFO] [stdout] 23 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 24 | | pub struct HandleSnapshotFlag: u32 { [INFO] [stdout] 25 | | const Inherit = 0x80000000; [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:1:9 [INFO] [stdout] | [INFO] [stdout] 1 | #![warn(missing_docs)] [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] = note: this warning originates in the macro `$crate::__declare_public_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for an associated constant [INFO] [stdout] --> src/handle.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | / bitflags! { [INFO] [stdout] 23 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 24 | | pub struct HandleSnapshotFlag: u32 { [INFO] [stdout] 25 | | const Inherit = 0x80000000; [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__impl_public_bitflags_consts` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/handle.rs:64:42 [INFO] [stdout] | [INFO] [stdout] 64 | pub fn get_memory_basic_informations(&self) -> HandleMemoryBasicInformationIter { [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] 64 | pub fn get_memory_basic_informations(&self) -> HandleMemoryBasicInformationIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/handle.rs:136:24 [INFO] [stdout] | [INFO] [stdout] 136 | pub fn get_modules(&self) -> HandleSnapshotModuleIter { [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] 136 | pub fn get_modules(&self) -> HandleSnapshotModuleIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for an associated function [INFO] [stdout] --> src/memory.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn new(handle: &'a Handle, start_address: usize, end_address: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for a struct [INFO] [stdout] --> src/memory.rs:122:1 [INFO] [stdout] | [INFO] [stdout] 122 | / bitflags! { [INFO] [stdout] 123 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 124 | | pub struct PageProtectionFlags: u32 { [INFO] [stdout] 125 | | const Execute = 0x10; [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__declare_public_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for an associated constant [INFO] [stdout] --> src/memory.rs:122:1 [INFO] [stdout] | [INFO] [stdout] 122 | / bitflags! { [INFO] [stdout] 123 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 124 | | pub struct PageProtectionFlags: u32 { [INFO] [stdout] 125 | | const Execute = 0x10; [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__impl_public_bitflags_consts` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for a struct [INFO] [stdout] --> src/memory.rs:156:1 [INFO] [stdout] | [INFO] [stdout] 156 | / bitflags! { [INFO] [stdout] 157 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 158 | | pub struct VirtualAllocationType: u32 { [INFO] [stdout] 159 | | const Commit = 0x1000; [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__declare_public_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for an associated constant [INFO] [stdout] --> src/memory.rs:156:1 [INFO] [stdout] | [INFO] [stdout] 156 | / bitflags! { [INFO] [stdout] 157 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 158 | | pub struct VirtualAllocationType: u32 { [INFO] [stdout] 159 | | const Commit = 0x1000; [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__impl_public_bitflags_consts` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for a struct [INFO] [stdout] --> src/memory.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | / bitflags! { [INFO] [stdout] 180 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 181 | | pub struct PageType: u32 { [INFO] [stdout] 182 | | const Image = 0x1000000; [INFO] [stdout] ... | [INFO] [stdout] 186 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__declare_public_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for an associated constant [INFO] [stdout] --> src/memory.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | / bitflags! { [INFO] [stdout] 180 | | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] [INFO] [stdout] 181 | | pub struct PageType: u32 { [INFO] [stdout] 182 | | const Image = 0x1000000; [INFO] [stdout] ... | [INFO] [stdout] 186 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `$crate::__impl_public_bitflags_consts` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.40s [INFO] running `Command { std: "docker" "inspect" "f8836ee812c27bb1dc168c0c0d47621653e96f3b9afccf1038c36642fe4a0fc0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f8836ee812c27bb1dc168c0c0d47621653e96f3b9afccf1038c36642fe4a0fc0", kill_on_drop: false }` [INFO] [stdout] f8836ee812c27bb1dc168c0c0d47621653e96f3b9afccf1038c36642fe4a0fc0