Quality of life improvements #89
clippy
6 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 6 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.73.0-nightly (903e279f4 2023-07-18)
- cargo 1.73.0-nightly (1b1555676 2023-07-18)
- clippy 0.1.73 (903e279 2023-07-18)
Annotations
Check warning on line 1227 in src/lib.rs
github-actions / clippy
passing a unit value to a function
warning: passing a unit value to a function
--> src/lib.rs:1227:38
|
1227 | init_from_closure(|slot| Ok(init.__init(slot).unwrap())) //cannot fail
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
1227 ~ init_from_closure(|slot| {
1228 + init.__init(slot).unwrap();
1229 + Ok(())
1230 ~ }) //cannot fail
|
Check warning on line 1213 in src/lib.rs
github-actions / clippy
passing a unit value to a function
warning: passing a unit value to a function
--> src/lib.rs:1213:17
|
1213 | Ok(init.__pinned_init(slot).unwrap()) // cannot fail
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
= note: `#[warn(clippy::unit_arg)]` on by default
help: move the expression in front of the call and replace it with the unit literal `()`
|
1213 ~ init.__pinned_init(slot).unwrap();
1214 ~ Ok(()) // cannot fail
|
Check warning on line 1264 in src/lib.rs
github-actions / clippy
unneeded sub `cfg` when there is only one condition
warning: unneeded sub `cfg` when there is only one condition
--> src/lib.rs:1264:7
|
1264 | #[cfg(any(feature = "alloc"))]
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `feature = "alloc"`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg
Check warning on line 1233 in src/lib.rs
github-actions / clippy
unneeded sub `cfg` when there is only one condition
warning: unneeded sub `cfg` when there is only one condition
--> src/lib.rs:1233:7
|
1233 | #[cfg(any(feature = "alloc"))]
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `feature = "alloc"`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg
Check warning on line 258 in src/lib.rs
github-actions / clippy
unneeded sub `cfg` when there is only one condition
warning: unneeded sub `cfg` when there is only one condition
--> src/lib.rs:258:7
|
258 | #[cfg(any(feature = "alloc"))]
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `feature = "alloc"`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg
Check warning on line 255 in src/lib.rs
github-actions / clippy
unneeded sub `cfg` when there is only one condition
warning: unneeded sub `cfg` when there is only one condition
--> src/lib.rs:255:7
|
255 | #[cfg(any(feature = "alloc"))]
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `feature = "alloc"`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg
= note: `#[warn(clippy::non_minimal_cfg)]` on by default