Clippy pedantic fixes

This commit is contained in:
2024-09-22 02:16:18 +03:00
parent 387a5eaf4a
commit f7008e882c
22 changed files with 162 additions and 275 deletions

View File

@@ -1,6 +1,5 @@
use anyhow::{Result, bail};
use anyhow::bail;
use egui::Color32;
use crate::ui::gui::Gui;
use super::{State, Window};
@@ -44,7 +43,7 @@ impl Window for GuiSongEditor {
ui.horizontal(|ui| {
ui.label("Type: ");
ui.label(&song.get_type().to_string());
ui.label(song.get_type().to_string());
});
ui.horizontal(|ui| {
@@ -67,7 +66,7 @@ impl Window for GuiSongEditor {
bail!("Failed to get song (2)");
};
*song.get_url_str_mut() = self.ed_url.clone();
song.get_url_str_mut().clone_from(&self.ed_url);
}
let Some(playlist) = state.manifest.get_playlist_mut(&playlist) else {
@@ -86,10 +85,10 @@ impl Window for GuiSongEditor {
}
impl GuiSongEditor {
pub fn set_active_song(&mut self, pname: &String, sname: &String, url: &String) {
self.song.0 = pname.clone();
self.song.1 = sname.clone();
self.ed_name = sname.clone();
self.ed_url = url.clone();
pub fn set_active_song(&mut self, pname: &str, sname: &str, url: &str) {
self.song.0 = pname.to_string();
self.song.1 = sname.to_string();
self.ed_name = sname.to_string();
self.ed_url = url.to_string();
}
}