Format code #63
Annotations
11 warnings
this function has too many arguments (10/7):
src/process.rs#L145
warning: this function has too many arguments (10/7)
--> src/process.rs:145:5
|
145 | / fn new(
146 | | address: umem,
147 | | pid: u32,
148 | | state: PyProcessState,
... |
155 | | dtb2: umem,
156 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
useless conversion to the same type: `std::slice::ChunksExact<'_, u8>`:
src/process.rs#L57
warning: useless conversion to the same type: `std::slice::ChunksExact<'_, u8>`
--> src/process.rs:57:35
|
57 | return Ok(buf
| ___________________________________^
58 | | .chunks_exact(2)
59 | | .into_iter()
| |________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into_iter()`
|
57 ~ return Ok(buf
58 + .chunks_exact(2)
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
src/internal.rs#L173
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/internal.rs:173:49
|
173 | InternalDT::Pointer(_, byteness) => *byteness as usize,
| ^^^^^^^^^^^^^^^^^^ help: try: `*byteness`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
slow zero-filling initialization:
src/internal.rs#L141
warning: slow zero-filling initialization
--> src/internal.rs:141:17
|
140 | let mut bytes = Vec::new();
| ---------- help: consider replacing this with: `vec![0; self.size()]`
141 | bytes.resize(self.size(), 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization
= note: `#[warn(clippy::slow_vector_initialization)]` on by default
|
useless conversion to the same type: `std::slice::Chunks<'_, u8>`:
src/internal.rs#L84
warning: useless conversion to the same type: `std::slice::Chunks<'_, u8>`
--> src/internal.rs:84:21
|
84 | / bytes
85 | | .chunks(dt.size())
86 | | .into_iter()
| |____________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
help: consider removing `.into_iter()`
|
84 ~ bytes
85 + .chunks(dt.size())
|
|
rust
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/cache@v1, actions-rs/clippy-check@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
this function has too many arguments (10/7):
src/process.rs#L145
warning: this function has too many arguments (10/7)
--> src/process.rs:145:5
|
145 | / fn new(
146 | | address: umem,
147 | | pid: u32,
148 | | state: PyProcessState,
... |
155 | | dtb2: umem,
156 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
useless conversion to the same type: `std::slice::ChunksExact<'_, u8>`:
src/process.rs#L57
warning: useless conversion to the same type: `std::slice::ChunksExact<'_, u8>`
--> src/process.rs:57:35
|
57 | return Ok(buf
| ___________________________________^
58 | | .chunks_exact(2)
59 | | .into_iter()
| |________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into_iter()`
|
57 ~ return Ok(buf
58 + .chunks_exact(2)
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
src/internal.rs#L173
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/internal.rs:173:49
|
173 | InternalDT::Pointer(_, byteness) => *byteness as usize,
| ^^^^^^^^^^^^^^^^^^ help: try: `*byteness`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
slow zero-filling initialization:
src/internal.rs#L141
warning: slow zero-filling initialization
--> src/internal.rs:141:17
|
140 | let mut bytes = Vec::new();
| ---------- help: consider replacing this with: `vec![0; self.size()]`
141 | bytes.resize(self.size(), 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization
= note: `#[warn(clippy::slow_vector_initialization)]` on by default
|
useless conversion to the same type: `std::slice::Chunks<'_, u8>`:
src/internal.rs#L84
warning: useless conversion to the same type: `std::slice::Chunks<'_, u8>`
--> src/internal.rs:84:21
|
84 | / bytes
85 | | .chunks(dt.size())
86 | | .into_iter()
| |____________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
help: consider removing `.into_iter()`
|
84 ~ bytes
85 + .chunks(dt.size())
|
|