better parsing of battery information in status bar widget #109
clippy
10 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 10 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0 (9b00956e5 2024-04-29)
- cargo 1.78.0 (54d8815d0 2024-03-26)
- clippy 0.1.78 (9b00956 2024-04-29)
Annotations
Check warning on line 1196 in src/pure/stack_set.rs
github-actions / clippy
assigning the result of `ToOwned::to_owned()` may be inefficient
warning: assigning the result of `ToOwned::to_owned()` may be inefficient
--> src/pure/stack_set.rs:1196:9
|
1196 | s.previous_tag = "PREVIOUS".to_owned();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `"PREVIOUS".clone_into(&mut s.previous_tag)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 1196 in src/pure/stack_set.rs
github-actions / clippy
assigning the result of `ToOwned::to_owned()` may be inefficient
warning: assigning the result of `ToOwned::to_owned()` may be inefficient
--> src/pure/stack_set.rs:1196:9
|
1196 | s.previous_tag = "PREVIOUS".to_owned();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `"PREVIOUS".clone_into(&mut s.previous_tag)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 1196 in src/pure/stack_set.rs
github-actions / clippy
assigning the result of `ToOwned::to_owned()` may be inefficient
warning: assigning the result of `ToOwned::to_owned()` may be inefficient
--> src/pure/stack_set.rs:1196:9
|
1196 | s.previous_tag = "PREVIOUS".to_owned();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `"PREVIOUS".clone_into(&mut s.previous_tag)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 1196 in src/pure/stack_set.rs
github-actions / clippy
assigning the result of `ToOwned::to_owned()` may be inefficient
warning: assigning the result of `ToOwned::to_owned()` may be inefficient
--> src/pure/stack_set.rs:1196:9
|
1196 | s.previous_tag = "PREVIOUS".to_owned();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `"PREVIOUS".clone_into(&mut s.previous_tag)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 68 in src/extensions/hooks/window_swallowing.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> src/extensions/hooks/window_swallowing.rs:68:9
|
68 | state.client_set.floating = self.floating_before_close.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `state.client_set.floating.clone_from(&self.floating_before_close)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 26 in src/extensions/hooks/window_swallowing.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> src/extensions/hooks/window_swallowing.rs:26:9
|
26 | self.floating_before_close = state.client_set.floating.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.floating_before_close.clone_from(&state.client_set.floating)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `#[warn(clippy::assigning_clones)]` on by default
Check warning on line 143 in src/core/mod.rs
github-actions / clippy
you are explicitly cloning with `.map()`
warning: you are explicitly cloning with `.map()`
--> src/core/mod.rs:141:9
|
141 | / self.extensions
142 | | .get()
143 | | .map(Arc::clone)
| |____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
note: the lint level is defined here
--> src/lib.rs:56:5
|
56 | clippy::style,
| ^^^^^^^^^^^^^
= note: `#[warn(clippy::map_clone)]` implied by `#[warn(clippy::style)]`
help: consider calling the dedicated `cloned` method
|
141 ~ self.extensions
142 + .get().cloned()
|
Check warning on line 68 in src/extensions/hooks/window_swallowing.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> src/extensions/hooks/window_swallowing.rs:68:9
|
68 | state.client_set.floating = self.floating_before_close.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `state.client_set.floating.clone_from(&self.floating_before_close)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 26 in src/extensions/hooks/window_swallowing.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> src/extensions/hooks/window_swallowing.rs:26:9
|
26 | self.floating_before_close = state.client_set.floating.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.floating_before_close.clone_from(&state.client_set.floating)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `#[warn(clippy::assigning_clones)]` on by default
Check warning on line 143 in src/core/mod.rs
github-actions / clippy
you are explicitly cloning with `.map()`
warning: you are explicitly cloning with `.map()`
--> src/core/mod.rs:141:9
|
141 | / self.extensions
142 | | .get()
143 | | .map(Arc::clone)
| |____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
note: the lint level is defined here
--> src/lib.rs:56:5
|
56 | clippy::style,
| ^^^^^^^^^^^^^
= note: `#[warn(clippy::map_clone)]` implied by `#[warn(clippy::style)]`
help: consider calling the dedicated `cloned` method
|
141 ~ self.extensions
142 + .get().cloned()
|