Skip to content

🌱 Bump github/codeql-action from 3.27.9 to 3.28.0 #216

🌱 Bump github/codeql-action from 3.27.9 to 3.28.0

🌱 Bump github/codeql-action from 3.27.9 to 3.28.0 #216

GitHub Actions / clippy succeeded Dec 23, 2024 in 0s

clippy

21 warnings

Details

Results

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

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 118 in src/diff.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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 115 in src/base.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> src/base.rs:115:6
    |
115 | impl<'a, S> Deref for ActualValue<'a, S> {
    |      ^^                           ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
115 - impl<'a, S> Deref for ActualValue<'a, S> {
115 + impl<S> Deref for ActualValue<'_, S> {
    |

Check warning on line 242 in src/assertions/set.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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
help: elide the lifetimes
    |
222 -     fn iter<'a>(&'a self) -> Self::It<'a>;
222 +     fn iter(&self) -> Self::It<'_>;
    |

Check warning on line 581 in src/assertions/map.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> src/assertions/map.rs:581:6
    |
581 | impl<'a, K: Debug, V: Debug> Debug for MapEntry<'a, K, V> {
    |      ^^                                         ^^
    |
    = 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
    |
581 - impl<'a, K: Debug, V: Debug> Debug for MapEntry<'a, K, V> {
581 + impl<K: Debug, V: Debug> Debug for MapEntry<'_, K, V> {
    |

Check warning on line 562 in src/assertions/map.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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 372 in src/assertions/map.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

elided lifetime has a name

warning: elided lifetime has a name
   --> src/assertions/map.rs:372:40
    |
372 |     fn key_set<'b>(&'b self) -> Subject<ML::It<'b>, (), R>
    |                --                      ^ this elided lifetime gets resolved as `'b`
    |                |
    |                lifetime `'b` declared here

Check warning on line 325 in src/assertions/map.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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 132 in src/assertions/map.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

elided lifetime has a name

warning: elided lifetime has a name
   --> src/assertions/map.rs:132:40
    |
132 |     fn key_set<'b>(&'b self) -> Subject<ML::It<'b>, (), R>
    |                --                      ^ this elided lifetime gets resolved as `'b`
    |                |
    |                lifetime `'b` declared here
    |
    = note: `#[warn(elided_named_lifetimes)]` on by default

Check warning on line 100 in src/assertions/map.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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