Compression #257
clippy
12 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 12 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.75.0 (82e1608df 2023-12-21)
- cargo 1.75.0 (1d8b05cdd 2023-11-20)
- clippy 0.1.75 (82e1608 2023-12-21)
Annotations
Check failure on line 451 in chitchat/src/serialize.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
error: casting to the same type is unnecessary (`usize` -> `usize`)
--> chitchat/src/serialize.rs:451:29
|
451 | buf.advance(len as usize);
| ^^^^^^^^^^^^ help: try: `len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check failure on line 441 in chitchat/src/serialize.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
error: casting to the same type is unnecessary (`usize` -> `usize`)
--> chitchat/src/serialize.rs:441:29
|
441 | buf.advance(len as usize);
| ^^^^^^^^^^^^ help: try: `len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-D clippy::unnecessary-cast` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`
Check failure on line 257 in chitchat/src/delta.rs
github-actions / clippy
needlessly taken reference of both operands
error: needlessly taken reference of both operands
--> chitchat/src/delta.rs:257:34
|
257 | .find(|node_delta| { &node_delta.chitchat_id == &chitchat_id })
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `-D clippy::op-ref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::op_ref)]`
help: use the values directly
|
257 | .find(|node_delta| { node_delta.chitchat_id == chitchat_id })
| ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
Check failure on line 258 in chitchat/src/delta.rs
github-actions / clippy
called `is_none()` after searching an `Iterator` with `find`
error: called `is_none()` after searching an `Iterator` with `find`
--> chitchat/src/delta.rs:254:17
|
254 | assert!(self
| _________________^
255 | | .node_deltas
256 | | .iter()
257 | | .find(|node_delta| { &node_delta.chitchat_id == &chitchat_id })
258 | | .is_none());
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
= note: `-D clippy::search-is-some` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::search_is_some)]`
help: use `!_.any()` instead
|
254 ~ assert!(!self
255 + .node_deltas
256 ~ .iter().any(|node_delta| { &node_delta.chitchat_id == &chitchat_id }));
|
Check failure on line 451 in chitchat/src/serialize.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
error: casting to the same type is unnecessary (`usize` -> `usize`)
--> chitchat/src/serialize.rs:451:29
|
451 | buf.advance(len as usize);
| ^^^^^^^^^^^^ help: try: `len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check failure on line 441 in chitchat/src/serialize.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
error: casting to the same type is unnecessary (`usize` -> `usize`)
--> chitchat/src/serialize.rs:441:29
|
441 | buf.advance(len as usize);
| ^^^^^^^^^^^^ help: try: `len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-D clippy::unnecessary-cast` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`
Check failure on line 21 in chitchat/src/delta.rs
github-actions / clippy
redundant closure
error: redundant closure
--> chitchat/src/delta.rs:21:18
|
21 | .map(|node_to_reset| DeltaOpRef::NodeToReset(node_to_reset));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `DeltaOpRef::NodeToReset`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-D clippy::redundant-closure` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
Check failure on line 17 in chitchat/src/delta.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
error: the following explicit lifetimes could be elided: 'a
--> chitchat/src/delta.rs:17:23
|
17 | fn get_operations<'a>(&'a self) -> impl Iterator<Item = DeltaOpRef<'a>> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `-D clippy::needless-lifetimes` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
|
17 - fn get_operations<'a>(&'a self) -> impl Iterator<Item = DeltaOpRef<'a>> {
17 + fn get_operations(&self) -> impl Iterator<Item = DeltaOpRef<'_>> {
|
Check failure on line 21 in chitchat/src/delta.rs
github-actions / clippy
redundant closure
error: redundant closure
--> chitchat/src/delta.rs:21:18
|
21 | .map(|node_to_reset| DeltaOpRef::NodeToReset(node_to_reset));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `DeltaOpRef::NodeToReset`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-D clippy::redundant-closure` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
Check failure on line 17 in chitchat/src/delta.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
error: the following explicit lifetimes could be elided: 'a
--> chitchat/src/delta.rs:17:23
|
17 | fn get_operations<'a>(&'a self) -> impl Iterator<Item = DeltaOpRef<'a>> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `-D clippy::needless-lifetimes` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
|
17 - fn get_operations<'a>(&'a self) -> impl Iterator<Item = DeltaOpRef<'a>> {
17 + fn get_operations(&self) -> impl Iterator<Item = DeltaOpRef<'_>> {
|
Check failure on line 6 in chitchat/src/serialize.rs
github-actions / clippy
this import is redundant
error: this import is redundant
--> chitchat/src/serialize.rs:6:1
|
6 | use zstd;
| ^^^^^^^^^ help: remove it entirely
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
= note: `-D clippy::single-component-path-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_component_path_imports)]`
Check failure on line 6 in chitchat/src/serialize.rs
github-actions / clippy
this import is redundant
error: this import is redundant
--> chitchat/src/serialize.rs:6:1
|
6 | use zstd;
| ^^^^^^^^^ help: remove it entirely
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
= note: `-D clippy::single-component-path-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_component_path_imports)]`