clippy warning fixes

This commit is contained in:
kdeng00
2025-05-23 19:49:56 -04:00
parent 503857a87d
commit 66791e80f6
+15 -15
View File
@@ -51,13 +51,13 @@ pub mod request {
album: self.album.clone(), album: self.album.clone(),
genre: self.genre.clone(), genre: self.genre.clone(),
year: self.date[..3].parse().unwrap(), year: self.date[..3].parse().unwrap(),
track: self.track.clone(), track: self.track,
disc: self.disc.clone(), disc: self.disc,
track_count: self.track_count.clone(), track_count: self.track_count,
disc_count: self.disc_count.clone(), disc_count: self.disc_count,
duration: self.duration.clone(), duration: self.duration,
audio_type: self.audio_type.clone(), audio_type: self.audio_type.clone(),
user_id: self.user_id.clone(), user_id: self.user_id,
// TODO: Change the type of this in icarus_models lib // TODO: Change the type of this in icarus_models lib
date_created: String::new(), date_created: String::new(),
filename: String::new(), filename: String::new(),
@@ -131,7 +131,7 @@ pub mod status {
} }
} }
mod song { mod song_db {
use sqlx::Row; use sqlx::Row;
// TODO: Change first parameter of return value from string to a time type // TODO: Change first parameter of return value from string to a time type
@@ -150,16 +150,16 @@ mod song {
.bind(&song.album_artist) .bind(&song.album_artist)
.bind(&song.album) .bind(&song.album)
.bind(&song.genre) .bind(&song.genre)
.bind(&song.year) .bind(song.year)
.bind(&song.track) .bind(song.track)
.bind(&song.disc) .bind(song.disc)
.bind(&song.track_count) .bind(song.track_count)
.bind(&song.disc_count) .bind(song.disc_count)
.bind(&song.duration) .bind(song.duration)
.bind(&song.audio_type) .bind(&song.audio_type)
.bind(&song.filename) .bind(&song.filename)
.bind(&song.directory) .bind(&song.directory)
.bind(&song.user_id) .bind(song.user_id)
.fetch_one(pool) .fetch_one(pool)
.await .await
.map_err(|e| { .map_err(|e| {
@@ -603,7 +603,7 @@ pub mod endpoint {
match song.song_path() { match song.song_path() {
Ok(_) => { Ok(_) => {
match super::song::insert(&pool, &song).await { match super::song_db::insert(&pool, &song).await {
Ok((date_created, id)) => { Ok((date_created, id)) => {
song.id = id; song.id = id;
song.date_created = date_created; song.date_created = date_created;