Ci bump #188
clippy
1 error, 5 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 1 |
Warning | 5 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.72.0 (5680fa18f 2023-08-23)
- cargo 1.72.0 (103a7ff2e 2023-08-15)
- clippy 0.1.72 (5680fa1 2023-08-23)
Annotations
Check warning on line 108 in src/set_ref.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'other
warning: the following explicit lifetimes could be elided: 'other
--> src/set_ref.rs:108:24
|
108 | pub fn is_superset<'other>(&self, other: &HashSetRef<'other, T, S>) -> bool {
| ^^^^^^ ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
108 - pub fn is_superset<'other>(&self, other: &HashSetRef<'other, T, S>) -> bool {
108 + pub fn is_superset(&self, other: &HashSetRef<'_, T, S>) -> bool {
|
Check warning on line 244 in src/set.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'g
warning: the following explicit lifetimes could be elided: 'g
--> src/set.rs:244:21
|
244 | pub fn contains<'g, Q>(&self, value: &Q, guard: &'g Guard<'_>) -> bool
| ^^ ^^
|
= 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
help: elide the lifetimes
|
244 - pub fn contains<'g, Q>(&self, value: &Q, guard: &'g Guard<'_>) -> bool
244 + pub fn contains<Q>(&self, value: &Q, guard: &Guard<'_>) -> bool
|
Check failure on line 132 in src/reclaim.rs
github-actions / clippy
incorrect implementation of `clone` on a `Copy` type
error: incorrect implementation of `clone` on a `Copy` type
--> src/reclaim.rs:130:29
|
130 | fn clone(&self) -> Self {
| _____________________________^
131 | | Shared::from(self.ptr)
132 | | }
| |_____^ help: change this to: `{ *self }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_clone_impl_on_copy_type
= note: `#[deny(clippy::incorrect_clone_impl_on_copy_type)]` on by default
Check warning on line 1164 in src/map.rs
github-actions / clippy
casting to the same type is unnecessary (`isize` -> `isize`)
warning: casting to the same type is unnecessary (`isize` -> `isize`)
--> src/map.rs:1164:16
|
1164 | if (count as isize) < sc {
| ^^^^^^^^^^^^^^^^ help: try: `count`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 785 in src/map.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/map.rs:785:33
|
785 | let bin = table.bin(i as usize, guard);
| ^^^^^^^^^^ help: try: `i`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 499 in src/map.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/map.rs:491:34
|
491 | let requested_capacity = if size >= MAXIMUM_CAPACITY / 2 {
| __________________________________^
492 | | MAXIMUM_CAPACITY
493 | | } else {
494 | | // round the requested_capacity to the next power of to from 1.5 * size + 1
... |
498 | | std::cmp::min(MAXIMUM_CAPACITY, size.next_power_of_two())
499 | | } as usize;
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
help: try
|
491 ~ let requested_capacity = if size >= MAXIMUM_CAPACITY / 2 {
492 + MAXIMUM_CAPACITY
493 + } else {
494 + // round the requested_capacity to the next power of to from 1.5 * size + 1
495 + // TODO: find out if this is neccessary
496 + let size = size + (size >> 1) + 1;
497 +
498 + std::cmp::min(MAXIMUM_CAPACITY, size.next_power_of_two())
499 ~ };
|