Compression #257
ci.yml
on: pull_request
Check (fmt, dependency check, clippy, test)
1m 15s
Annotations
13 errors and 2 warnings
casting to the same type is unnecessary (`usize` -> `usize`):
chitchat/src/serialize.rs#L451
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
|
casting to the same type is unnecessary (`usize` -> `usize`):
chitchat/src/serialize.rs#L441
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)]`
|
needlessly taken reference of both operands:
chitchat/src/delta.rs#L257
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 })
| ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
|
called `is_none()` after searching an `Iterator` with `find`:
chitchat/src/delta.rs#L254
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 }));
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
chitchat/src/serialize.rs#L451
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
|
casting to the same type is unnecessary (`usize` -> `usize`):
chitchat/src/serialize.rs#L441
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)]`
|
redundant closure:
chitchat/src/delta.rs#L21
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)]`
|
the following explicit lifetimes could be elided: 'a:
chitchat/src/delta.rs#L17
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<'_>> {
|
|
redundant closure:
chitchat/src/delta.rs#L21
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)]`
|
the following explicit lifetimes could be elided: 'a:
chitchat/src/delta.rs#L17
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<'_>> {
|
|
this import is redundant:
chitchat/src/serialize.rs#L6
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)]`
|
this import is redundant:
chitchat/src/serialize.rs#L6
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 (fmt, dependency check, clippy, test)
Clippy had exited with the 101 exit code
|
Check (fmt, dependency check, clippy, test)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v2, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Check (fmt, dependency check, clippy, test)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/cache@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|