From b73e0db1f5b645596cbe78f379cadbd301ae9c5e Mon Sep 17 00:00:00 2001 From: Antoine Gersant Date: Tue, 11 Jul 2017 20:13:58 -0700 Subject: [PATCH] Removed unecessary field --- src/playlist.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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())?; }