Compression #272
ci.yml
on: pull_request
Check (fmt, dependency check, clippy, test)
47s
Annotations
11 errors and 2 warnings
casting to the same type is unnecessary (`usize` -> `usize`):
chitchat/src/serialize.rs#L430
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
|
casting to the same type is unnecessary (`usize` -> `usize`):
chitchat/src/serialize.rs#L420
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)]`
|
casting to the same type is unnecessary (`usize` -> `usize`):
chitchat/src/serialize.rs#L430
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
|
casting to the same type is unnecessary (`usize` -> `usize`):
chitchat/src/serialize.rs#L420
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)]`
|
needlessly taken reference of both operands:
chitchat/src/delta.rs#L259
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 })
| ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
|
called `is_none()` after searching an `Iterator` with `find`:
chitchat/src/delta.rs#L256
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 }));
|
|
redundant closure:
chitchat/src/delta.rs#L32
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)]`
|
the following explicit lifetimes could be elided: 'a:
chitchat/src/delta.rs#L28
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<'_>> {
|
|
redundant closure:
chitchat/src/delta.rs#L32
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)]`
|
the following explicit lifetimes could be elided: 'a:
chitchat/src/delta.rs#L28
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 (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/
|