Skip to content

Compression

Compression #272

GitHub Actions / clippy failed Feb 13, 2024 in 1s

clippy

10 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 10
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 430 in chitchat/src/serialize.rs

See this annotation in the file changed.

@github-actions 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:430:29
    |
430 |                 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 420 in chitchat/src/serialize.rs

See this annotation in the file changed.

@github-actions 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:420:29
    |
420 |                 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 430 in chitchat/src/serialize.rs

See this annotation in the file changed.

@github-actions 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:430:29
    |
430 |                 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 420 in chitchat/src/serialize.rs

See this annotation in the file changed.

@github-actions 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:420:29
    |
420 |                 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 259 in chitchat/src/delta.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

needlessly taken reference of both operands

error: needlessly taken reference of both operands
   --> chitchat/src/delta.rs:259:34
    |
259 |             .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
    |
259 |             .find(|node_delta| { node_delta.chitchat_id == chitchat_id })
    |                                  ~~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~~~~~

Check failure on line 260 in chitchat/src/delta.rs

See this annotation in the file changed.

@github-actions 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:256:17
    |
256 |           assert!(self
    |  _________________^
257 | |             .node_deltas
258 | |             .iter()
259 | |             .find(|node_delta| { &node_delta.chitchat_id == &chitchat_id })
260 | |             .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
    |
256 ~         assert!(!self
257 +             .node_deltas
258 ~             .iter().any(|node_delta| { &node_delta.chitchat_id == &chitchat_id }));
    |

Check failure on line 32 in chitchat/src/delta.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

error: redundant closure
  --> chitchat/src/delta.rs:32:18
   |
32 |             .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 28 in chitchat/src/delta.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

error: the following explicit lifetimes could be elided: 'a
  --> chitchat/src/delta.rs:28:23
   |
28 |     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
   |
28 -     fn get_operations<'a>(&'a self) -> impl Iterator<Item = DeltaOpRef<'a>> {
28 +     fn get_operations(&self) -> impl Iterator<Item = DeltaOpRef<'_>> {
   |

Check failure on line 32 in chitchat/src/delta.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

error: redundant closure
  --> chitchat/src/delta.rs:32:18
   |
32 |             .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 28 in chitchat/src/delta.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

error: the following explicit lifetimes could be elided: 'a
  --> chitchat/src/delta.rs:28:23
   |
28 |     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
   |
28 -     fn get_operations<'a>(&'a self) -> impl Iterator<Item = DeltaOpRef<'a>> {
28 +     fn get_operations(&self) -> impl Iterator<Item = DeltaOpRef<'_>> {
   |