Skip to content

Direct HashTable without NR. #1543

Direct HashTable without NR.

Direct HashTable without NR. #1543

GitHub Actions / clippy succeeded Dec 7, 2023 in 3s

clippy

210 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 210
Note 0
Help 0

Versions

  • rustc 1.67.0-nightly (a28f3c88e 2022-11-20)
  • cargo 1.67.0-nightly (eb5d35917 2022-11-17)
  • clippy 0.1.66 (a28f3c8 2022-11-20)

Annotations

Check warning on line 166 in lib/node-replication/cnr/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)

warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
   --> lib/node-replication/cnr/src/lib.rs:166:5
    |
166 |     fn dispatch<'a>(&self, op: Self::ReadOperation<'a>) -> Self::Response;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes

Check warning on line 1076 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the loop variable `logidx` is used to index `tails`

warning: the loop variable `logidx` is used to index `tails`
    --> lib/node-replication/cnr/src/replica.rs:1076:23
     |
1076 |         for logidx in start..end {
     |                       ^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
     |
1076 |         for (logidx, <item>) in tails.iter().enumerate().take(end).skip(start) {
     |             ~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 1074 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

writing `&Vec` instead of `&[_]` involves a new object where a slice will do

warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
    --> lib/node-replication/cnr/src/replica.rs:1074:73
     |
1074 |     fn is_replica_sync_for_logs(&self, start: usize, end: usize, tails: &Vec<usize>) -> bool {
     |                                                                         ^^^^^^^^^^^ help: change this to: `&[usize]`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg

Check warning on line 1084 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
    --> lib/node-replication/cnr/src/replica.rs:1084:9
     |
1084 |         return is_synced;
     |         ^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
     = help: remove `return`

Check warning on line 1042 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the loop variable `logidx` is used to index `depends_on`

warning: the loop variable `logidx` is used to index `depends_on`
    --> lib/node-replication/cnr/src/replica.rs:1042:31
     |
1042 |                 for logidx in 1..self.logstate.len() {
     |                               ^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
     |
1042 |                 for (logidx, <item>) in depends_on.iter().enumerate().take(self.logstate.len()).skip(1) {
     |                     ~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 1059 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
    --> lib/node-replication/cnr/src/replica.rs:1059:30
     |
1059 |                     false => return false,
     |                              ^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
     = help: remove `return`

Check warning on line 1057 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
    --> lib/node-replication/cnr/src/replica.rs:1057:25
     |
1057 |                         return true;
     |                         ^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
     = help: remove `return`

Check warning on line 1035 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
    --> lib/node-replication/cnr/src/replica.rs:1035:25
     |
1035 |                         return self.is_replica_sync_for_logs(logidx, logidx + 1, depends_on);
     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
     = help: remove `return`

Check warning on line 1032 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
    --> lib/node-replication/cnr/src/replica.rs:1032:29
     |
1032 |                     true => return true,
     |                             ^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
     = help: remove `return`

Check warning on line 1001 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
    --> lib/node-replication/cnr/src/replica.rs:1001:25
     |
1001 |                         return self.handle_scan_op(o, thread_id, hashidx, rid, tid, depends_on);
     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
     = help: remove `return`

Check warning on line 997 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> lib/node-replication/cnr/src/replica.rs:997:25
    |
997 |                         return true;
    |                         ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = help: remove `return`

Check warning on line 970 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> lib/node-replication/cnr/src/replica.rs:970:25
    |
970 |                         return self.handle_scan_op(o, thread_id, hashidx, rid, tid, depends_on);
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = help: remove `return`

Check warning on line 966 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> lib/node-replication/cnr/src/replica.rs:966:25
    |
966 |                         return true;
    |                         ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = help: remove `return`

Check warning on line 846 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)

warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
   --> lib/node-replication/cnr/src/replica.rs:842:5
    |
842 | /     fn read_only<'rop>(
843 | |         &self,
844 | |         op: <D as Dispatch>::ReadOperation<'rop>,
845 | |         tid: usize,
846 | |     ) -> <D as Dispatch>::Response {
    | |__________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes

Check warning on line 760 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

called `unwrap` on `r` after checking its variant with `is_some`

warning: called `unwrap` on `r` after checking its variant with `is_some`
   --> lib/node-replication/cnr/src/replica.rs:760:24
    |
759 |             if r.is_some() {
    |             -------------- help: try: `if let Some(..) = r`
760 |                 return r.unwrap();
    |                        ^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
    = note: `#[warn(clippy::unnecessary_unwrap)]` on by default

Check warning on line 745 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)

warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
   --> lib/node-replication/cnr/src/replica.rs:741:5
    |
741 | /     pub fn execute<'rop>(
742 | |         &self,
743 | |         op: <D as Dispatch>::ReadOperation<'rop>,
744 | |         idx: ReplicaToken,
745 | |     ) -> <D as Dispatch>::Response {
    | |__________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes

Check warning on line 636 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> lib/node-replication/cnr/src/replica.rs:635:29
    |
635 | / ...                   return self
636 | | ...                       .handle_scan_op(o, thread_id, *logidx, rid, tid, depends_on);
    | |______________________________________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = help: remove `return`

Check warning on line 631 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> lib/node-replication/cnr/src/replica.rs:631:29
    |
631 | ...                   return true;
    |                       ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = help: remove `return`

Check warning on line 604 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

returning the result of a `let` binding from a block

warning: returning the result of a `let` binding from a block
   --> lib/node-replication/cnr/src/replica.rs:604:9
    |
602 |         let resp = self.get_response(idx.0, hash);
    |         ------------------------------------------ unnecessary `let` binding
603 |
604 |         resp
    |         ^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
    |
602 ~         
603 | 
604 ~         self.get_response(idx.0, hash)
    |

Check warning on line 596 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant clone

warning: redundant clone
   --> lib/node-replication/cnr/src/replica.rs:596:29
    |
596 |         self.make_pending(op.clone(), idx.0, hash, true);
    |                             ^^^^^^^^ help: remove this
    |
note: this value is dropped without further use
   --> lib/node-replication/cnr/src/replica.rs:596:27
    |
596 |         self.make_pending(op.clone(), idx.0, hash, true);
    |                           ^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone

Check warning on line 498 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant clone

warning: redundant clone
   --> lib/node-replication/cnr/src/replica.rs:498:29
    |
498 |         self.make_pending(op.clone(), idx.0, hash, false);
    |                             ^^^^^^^^ help: remove this
    |
note: this value is dropped without further use
   --> lib/node-replication/cnr/src/replica.rs:498:27
    |
498 |         self.make_pending(op.clone(), idx.0, hash, false);
    |                           ^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
    = note: `#[warn(clippy::redundant_clone)]` on by default

Check warning on line 277 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)

warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
   --> lib/node-replication/cnr/src/replica.rs:274:5
    |
274 | /     pub fn with_data<'b>(
275 | |         logs: Vec<Arc<Log<'b, <D as Dispatch>::WriteOperation>>>,
276 | |         d: D,
277 | |     ) -> Arc<Replica<'b, D>> {
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes

Check warning on line 256 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)

warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
   --> lib/node-replication/cnr/src/replica.rs:254:5
    |
254 | /     pub fn new<'b>(
255 | |         logs: Vec<Arc<Log<'b, <D as Dispatch>::WriteOperation>>>,
256 | |     ) -> Arc<Replica<'b, D>> {
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `#[warn(clippy::needless_lifetimes)]` on by default

Check warning on line 90 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
  --> lib/node-replication/cnr/src/replica.rs:90:18
   |
90 |     scan_buffer: CachePadded<RefCell<Vec<(<D as Dispatch>::WriteOperation, usize)>>>,
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Check warning on line 87 in lib/node-replication/cnr/src/replica.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
  --> lib/node-replication/cnr/src/replica.rs:87:13
   |
87 |     buffer: CachePadded<RefCell<Vec<(<D as Dispatch>::WriteOperation, usize)>>>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity