Skip to content

Commit

Permalink
refactor: cargo clippy --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudxain committed Dec 8, 2024
1 parent 65349ec commit 1da5b69
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
11 changes: 1 addition & 10 deletions src/core/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub struct BackupSettings {
}

#[derive(Debug, Serialize, Deserialize, Clone)]
#[derive(Default)]
pub struct DeviceSettings {
/// Unique serial identifier
pub device_id: String,
Expand All @@ -51,16 +52,6 @@ impl Default for GeneralSettings {
}
}

impl Default for DeviceSettings {
fn default() -> Self {
Self {
device_id: String::default(),
multi_user_mode: false,
disable_mode: false,
backup: BackupSettings::default(),
}
}
}

#[dynamic]
static CONFIG_FILE: PathBuf = CONFIG_DIR.join("config.toml");
Expand Down
2 changes: 1 addition & 1 deletion src/core/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ pub fn request_builder(commands: &[&str], package: &str, user: Option<&User>) ->
let maybe_user_flag = user_flag(user);
commands
.iter()
.map(|c| format!("{}{} {}", c, maybe_user_flag, package))
.map(|c| format!("{c}{maybe_user_flag} {package}"))
.collect()
}

Expand Down
8 changes: 4 additions & 4 deletions src/gui/widgets/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ impl<'a, Message, Theme, Renderer> Modal<'a, Message, Theme, Renderer> {
}
}

impl<'a, Message, Theme, Renderer> Widget<Message, Theme, Renderer>
for Modal<'a, Message, Theme, Renderer>
impl<Message, Theme, Renderer> Widget<Message, Theme, Renderer>
for Modal<'_, Message, Theme, Renderer>
where
Renderer: advanced::Renderer,
Message: Clone,
Expand Down Expand Up @@ -160,8 +160,8 @@ struct Overlay<'a, 'b, Message, Theme, Renderer> {
on_blur: Option<Message>,
}

impl<'a, 'b, Message, Theme, Renderer> overlay::Overlay<Message, Theme, Renderer>
for Overlay<'a, 'b, Message, Theme, Renderer>
impl<Message, Theme, Renderer> overlay::Overlay<Message, Theme, Renderer>
for Overlay<'_, '_, Message, Theme, Renderer>
where
Renderer: advanced::Renderer,
Message: Clone,
Expand Down

0 comments on commit 1da5b69

Please sign in to comment.