mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 23:01:04 +02:00
refactor: fix latest clippy warnings
This commit is contained in:
parent
f78a062f3a
commit
04a694e2ad
5 changed files with 24 additions and 24 deletions
|
@ -40,7 +40,7 @@ impl Item {
|
|||
let id = info.id;
|
||||
|
||||
if self.windows.is_empty() {
|
||||
self.name = info.title.clone();
|
||||
self.name.clone_from(&info.title);
|
||||
}
|
||||
|
||||
let window = Window::from(info);
|
||||
|
@ -59,7 +59,7 @@ impl Item {
|
|||
pub fn set_window_name(&mut self, window_id: usize, name: String) {
|
||||
if let Some(window) = self.windows.get_mut(&window_id) {
|
||||
if let OpenState::Open { focused: true, .. } = window.open_state {
|
||||
self.name = name.clone();
|
||||
self.name.clone_from(&name);
|
||||
}
|
||||
|
||||
window.name = name;
|
||||
|
|
|
@ -409,7 +409,7 @@ impl Module<Button> for MusicModule {
|
|||
// only update art when album changes
|
||||
let new_cover = update.song.cover_path;
|
||||
if prev_cover != new_cover {
|
||||
prev_cover = new_cover.clone();
|
||||
prev_cover.clone_from(&new_cover);
|
||||
let res = if let Some(image) = new_cover.and_then(|cover_path| {
|
||||
ImageProvider::parse(&cover_path, &icon_theme, false, image_size)
|
||||
}) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue