Skip to content

Update cosmic_ext_tweaks.ftl #53

Update cosmic_ext_tweaks.ftl

Update cosmic_ext_tweaks.ftl #53

Triggered via push November 10, 2024 15:06
Status Success
Total duration 4m 36s
Artifacts

push.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

12 warnings
/home/runner/work/tweaks/tweaks/src/main.rs#L185
useless conversion to the same type: `&str`
/home/runner/work/tweaks/tweaks/src/main.rs#L185
useless conversion to the same type: `&str`
/home/runner/work/tweaks/tweaks/src/main.rs#L69
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
/home/runner/work/tweaks/tweaks/src/main.rs#L71
the borrowed expression implements the required traits
useless conversion to the same type: `&str`: src/main.rs#L185
warning: useless conversion to the same type: `&str` --> src/app.rs:185:27 | 185 | .developers([("Eduardo Flores".into(), "[email protected]".into())]); | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"Eduardo Flores"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
useless conversion to the same type: `&str`: src/main.rs#L185
warning: useless conversion to the same type: `&str` --> src/app.rs:185:52 | 185 | .developers([("Eduardo Flores".into(), "[email protected]".into())]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"[email protected]"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
this match could be replaced by its body itself: src/main.rs#L493
warning: this match could be replaced by its body itself --> src/app.rs:493:42 | 493 | Message::Layouts(message) => match message { | __________________________________________^ 494 | | _ => commands.push(self.layouts.update(message).map(cosmic::app::Message::App)), 495 | | }, | |_____________^ help: consider using the match body instead: `commands.push(self.layouts.update(message).map(cosmic::app::Message::App))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding = note: `#[warn(clippy::match_single_binding)]` on by default
this `impl` can be derived: src/main.rs#L18
warning: this `impl` can be derived --> src/pages/snapshots/config.rs:18:1 | 18 | / impl Default for SnapshotsConfig { 19 | | fn default() -> Self { 20 | | Self { snapshots: vec![] } 21 | | } 22 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `#[warn(clippy::derivable_impls)]` on by default = help: remove the manual implementation... help: ...and instead derive it | 14 + #[derive(Default)] 15 | pub struct SnapshotsConfig { |
direct implementation of `ToString`: src/main.rs#L59
warning: direct implementation of `ToString` --> src/pages/snapshots/config.rs:59:1 | 59 | / impl ToString for SnapshotKind { 60 | | fn to_string(&self) -> String { 61 | | match self { 62 | | Self::System => fl!("system"), ... | 65 | | } 66 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl = note: `#[warn(clippy::to_string_trait_impl)]` on by default
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: src/main.rs#L69
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> src/pages/snapshots/config.rs:69:34 | 69 | pub fn new(name: &str, path: &PathBuf, kind: SnapshotKind) -> Self { | ^^^^^^^^ help: change this to: `&Path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default
the borrowed expression implements the required traits: src/main.rs#L71
warning: the borrowed expression implements the required traits --> src/pages/snapshots/config.rs:71:30 | 71 | let path = path.join(&name).with_extension("ron"); | ^^^^^ help: change this to: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
7 warnings emitted
warning: 7 warnings emitted