clippy #337
clippy
5 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 5 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.79.0 (129f3b996 2024-06-10)
- cargo 1.79.0 (ffa9cf99a 2024-06-03)
- clippy 0.1.79 (129f3b9 2024-06-10)
Annotations
Check warning on line 1155 in src/tree/tree.rs
github-actions / clippy
type parameter `U` goes unused in function definition
warning: type parameter `U` goes unused in function definition
--> src/tree/tree.rs:1155:24
|
1155 | fn get_subtree_size<U: SmallUnsigned>(&self, idx: usize) -> usize {
| ^^^^^^^^^^^^^^^^^^ help: consider removing the parameter
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
= note: `#[warn(clippy::extra_unused_type_parameters)]` on by default
Check warning on line 512 in src/tree/tree.rs
github-actions / clippy
`filter(..).map(..)` can be simplified as `filter_map(..)`
warning: `filter(..).map(..)` can be simplified as `filter_map(..)`
--> src/tree/tree.rs:511:18
|
511 | .filter(|n| n.is_some())
| __________________^
512 | | .map(|n| n.as_ref().unwrap())
| |_____________________________________________^ help: try: `filter_map(|n| n.as_ref())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter_map
= note: `#[warn(clippy::manual_filter_map)]` on by default
Check warning on line 114 in src/tree/arena.rs
github-actions / clippy
replacing an `Option` with `None`
warning: replacing an `Option` with `None`
--> src/tree/arena.rs:114:24
|
114 | let node = core::mem::replace(&mut self.vec[idx], None);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.vec[idx].take()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none
= note: `#[warn(clippy::mem_replace_option_with_none)]` on by default
Check warning on line 205 in src/lib.rs
github-actions / clippy
duplicated attribute
warning: duplicated attribute
--> src/lib.rs:205:9
|
205 | #![deny(missing_docs)]
| ^^^^^^^^^^^^
|
note: first defined here
--> src/lib.rs:201:43
|
201 | #![cfg_attr(not(any(test, fuzzing)), deny(missing_docs))]
| ^^^^^^^^^^^^
help: remove this attribute
--> src/lib.rs:205:9
|
205 | #![deny(missing_docs)]
| ^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duplicated_attributes
= note: `#[warn(clippy::duplicated_attributes)]` on by default
Check warning on line 228 in src/lib.rs
github-actions / clippy
unused import: `macros::*`
warning: unused import: `macros::*`
--> src/lib.rs:228:9
|
228 | pub use macros::*;
| ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default