Warning fixes #54

Merged
kdeng00 merged 4 commits from warning_fixes into icarus_v2_support 2025-07-02 19:25:08 -04:00
5 changed files with 8 additions and 23 deletions
Showing only changes of commit 08c38191d6 - Show all commits
+8 -19
View File
@@ -74,9 +74,7 @@ pub fn retrieve_song(
if found {
Ok(song)
} else {
Err(std::io::Error::other(
"Song not found",
))
Err(std::io::Error::other("Song not found"))
}
}
@@ -188,7 +186,8 @@ impl CommitManager {
let mut dwn_loader = syncers::download::Download { api: api.clone() };
let song = icarus_models::song::Song {
id: song_id, ..Default::default()
id: song_id,
..Default::default()
};
let result_fut = dwn_loader.download_song(&token, &song);
match Runtime::new().unwrap().block_on(result_fut) {
@@ -376,32 +375,22 @@ impl CommitManager {
}
Err(er) => {
println!("Some error {er:?}");
Err(std::io::Error::other(
er.to_string(),
))
Err(std::io::Error::other(er.to_string()))
}
}
}
Err(err) => {
println!("Error: {err:?}");
Err(std::io::Error::other(
err.to_string(),
))
Err(std::io::Error::other(err.to_string()))
}
}
}
Err(er) => {
println!("Error: {er:?}");
Err(std::io::Error::other(
er.to_string(),
))
Err(std::io::Error::other(er.to_string()))
}
},
_ => {
Err(std::io::Error::other(
"No sutitable file found".to_owned(),
))
}
_ => Err(std::io::Error::other("No sutitable file found".to_owned())),
}
}
@@ -515,7 +504,7 @@ impl CommitManager {
if let En::ImageFile = self.find_file_extension(&file_name) {
let directory_part = directory_path.clone();
let fname = utilities::string::o_to_string(&file_name);
let fullpath = format!("{}/{}", directory_part ,&fname.unwrap());
let fullpath = format!("{}/{}", directory_part, &fname.unwrap());
return Ok(fullpath);
}
}
-1
View File
@@ -10,7 +10,6 @@ pub struct UserManager {
pub ica_action: models::icarus_action::IcarusAction,
}
impl UserManager {
pub fn retrieve_user(&self) -> icarus_models::user::User {
self.user.clone()
-1
View File
@@ -8,4 +8,3 @@ pub struct Api {
pub endpoint: String,
pub version: String,
}
-1
View File
@@ -7,4 +7,3 @@ pub struct Flags {
pub flag: String,
pub value: String,
}
-1
View File
@@ -7,4 +7,3 @@ pub struct UploadForm {
pub url: Option<String>,
pub filepath: Option<String>,
}