diff --git a/src/playlist.rs b/src/playlist.rs index 2a79c13..0ced4d4 100644 --- a/src/playlist.rs +++ b/src/playlist.rs @@ -24,7 +24,6 @@ struct NewPlaylist { #[derive(Identifiable, Queryable)] pub struct User { id: i32, - name: String, } #[derive(Identifiable, Queryable, Associations)] @@ -62,7 +61,7 @@ fn list_playlists(owner: &str, db: &T) -> Result> use self::users::dsl::*; user = users .filter(name.eq(owner)) - .select((id, name)) + .select((id,)) .first(connection.deref())?; } @@ -91,7 +90,7 @@ fn save_playlist(name: &str, owner: &str, content: &Vec, db: &T) -> R use self::users::dsl::*; user = users .filter(name.eq(owner)) - .select((id, name)) + .select((id,)) .get_result(connection.deref())?; } @@ -165,7 +164,7 @@ fn read_playlist(playlist_name: &str, owner: &str, db: &T) -> Result(playlist_name: &str, owner: &str, db: &T) -> Result<()> use self::users::dsl::*; user = users .filter(name.eq(owner)) - .select((id, name)) + .select((id,)) .first(connection.deref())?; }