🌱 Bump github/codeql-action from 3.25.13 to 3.25.14 #126
clippy
18 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 18 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.82.0-nightly (c1a6199e9 2024-07-24)
- cargo 1.82.0-nightly (5f6b9a922 2024-07-19)
- clippy 0.1.81 (c1a6199 2024-07-24)
Annotations
Check warning on line 118 in src/diff.rs
github-actions / clippy
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap`
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap`
--> src/diff.rs:118:18
|
118 | self.into_iter().collect()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
Check warning on line 92 in src/diff.rs
github-actions / clippy
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeMap`
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeMap`
--> src/diff.rs:92:18
|
92 | self.into_iter().collect()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
Check warning on line 405 in src/base.rs
github-actions / clippy
useless use of `format!`
warning: useless use of `format!`
--> src/base.rs:405:47
|
405 | ... .map(|el| format!("{}", el))
| ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `el.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
Check warning on line 410 in src/base.rs
github-actions / clippy
useless use of `format!`
warning: useless use of `format!`
--> src/base.rs:387:44
|
387 | let formatted_values = format!(
| ____________________________________________^
388 | | "{}",
389 | | if use_multiline_output {
390 | | let elements = values
... |
409 | | }
410 | | );
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
= note: `#[warn(clippy::useless_format)]` on by default
help: consider using `.to_string()`
|
387 ~ let formatted_values = (if use_multiline_output {
388 + let elements = values
389 + .iter()
390 + .map(|el| format!(" - {}", el))
391 + .collect::<Vec<_>>()
392 + .join("\n");
393 + if values_size > 0 {
394 + format!("[\n{}\n]", elements)
395 + } else {
396 + "[]".to_string()
397 + }
398 + } else {
399 + format!(
400 + "[ {} ]",
401 + values
402 + .iter()
403 + .map(|el| format!("{}", el))
404 + .collect::<Vec<_>>()
405 + .join(", ")
406 + )
407 ~ }).to_string();
|
Check warning on line 243 in src/assertions/set.rs
github-actions / clippy
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeSet`
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeSet`
--> src/assertions/set.rs:243:14
|
243 | self.into_iter()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
Check warning on line 242 in src/assertions/set.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> src/assertions/set.rs:242:13
|
242 | fn iter<'a>(&'a self) -> Self::It<'a> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
242 - fn iter<'a>(&'a self) -> Self::It<'a> {
242 + fn iter(&self) -> Self::It<'_> {
|
Check warning on line 235 in src/assertions/set.rs
github-actions / clippy
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashSet`
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashSet`
--> src/assertions/set.rs:235:14
|
235 | self.into_iter()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
Check warning on line 234 in src/assertions/set.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> src/assertions/set.rs:234:13
|
234 | fn iter<'a>(&'a self) -> Self::It<'a> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
234 - fn iter<'a>(&'a self) -> Self::It<'a> {
234 + fn iter(&self) -> Self::It<'_> {
|
Check warning on line 222 in src/assertions/set.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> src/assertions/set.rs:222:13
|
222 | fn iter<'a>(&'a self) -> Self::It<'a>;
| ^^ ^^ ^^
|
= 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
|
222 - fn iter<'a>(&'a self) -> Self::It<'a>;
222 + fn iter(&self) -> Self::It<'_>;
|
Check warning on line 562 in src/assertions/map.rs
github-actions / clippy
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> src/assertions/map.rs:562:18
|
562 | .into_iter()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
Check warning on line 528 in src/assertions/map.rs
github-actions / clippy
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> src/assertions/map.rs:528:18
|
528 | .into_iter()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `#[warn(clippy::into_iter_on_ref)]` on by default
Check warning on line 344 in src/assertions/map.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/assertions/map.rs:344:9
|
344 | return self.new_result().do_ok();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
344 - return self.new_result().do_ok();
344 + self.new_result().do_ok()
|
Check warning on line 325 in src/assertions/map.rs
github-actions / clippy
bound is defined in more than one place
warning: bound is defined in more than one place
--> src/assertions/map.rs:325:29
|
325 | fn does_not_contain_any<BM: 'a, OML: 'a>(&self, expected: BM) -> R
| ^^
...
330 | BM: Borrow<OML> + 'a,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
Check warning on line 325 in src/assertions/map.rs
github-actions / clippy
bound is defined in more than one place
warning: bound is defined in more than one place
--> src/assertions/map.rs:325:37
|
325 | fn does_not_contain_any<BM: 'a, OML: 'a>(&self, expected: BM) -> R
| ^^^
...
329 | OML: MapLike<K, V> + 'a,
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
Check warning on line 100 in src/assertions/map.rs
github-actions / clippy
bound is defined in more than one place
warning: bound is defined in more than one place
--> src/assertions/map.rs:100:29
|
100 | fn does_not_contain_any<BM: 'a, OML: 'a>(&self, expected: BM) -> R
| ^^
...
105 | BM: Borrow<OML> + 'a;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
Check warning on line 100 in src/assertions/map.rs
github-actions / clippy
bound is defined in more than one place
warning: bound is defined in more than one place
--> src/assertions/map.rs:100:37
|
100 | fn does_not_contain_any<BM: 'a, OML: 'a>(&self, expected: BM) -> R
| ^^^
...
104 | OML: MapLike<K, V> + 'a,
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
Check warning on line 92 in src/assertions/map.rs
github-actions / clippy
bound is defined in more than one place
warning: bound is defined in more than one place
--> src/assertions/map.rs:92:26
|
92 | fn contains_at_least<BM: 'a, OML: 'a>(&self, expected: BM) -> R
| ^^
...
97 | BM: Borrow<OML> + 'a;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
Check warning on line 92 in src/assertions/map.rs
github-actions / clippy
bound is defined in more than one place
warning: bound is defined in more than one place
--> src/assertions/map.rs:92:34
|
92 | fn contains_at_least<BM: 'a, OML: 'a>(&self, expected: BM) -> R
| ^^^
...
96 | OML: MapLike<K, V> + 'a,
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
= note: `#[warn(clippy::multiple_bound_locations)]` on by default