From ed81d24b7b231b2bce84910cef62acb7f7cf8ccd Mon Sep 17 00:00:00 2001 From: Antoine Gersant Date: Sun, 11 Nov 2018 12:10:09 -0800 Subject: [PATCH] Formatting --- src/api.rs | 1 - src/lastfm.rs | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/api.rs b/src/api.rs index d28b47f..73f2b0a 100644 --- a/src/api.rs +++ b/src/api.rs @@ -234,7 +234,6 @@ fn auth( credentials: Json, mut cookies: Cookies, ) -> Result, errors::Error> { - if !user::auth::(&db, &credentials.username, &credentials.password)? { bail!(errors::ErrorKind::IncorrectCredentials) } diff --git a/src/lastfm.rs b/src/lastfm.rs index 0f45554..3236e4d 100644 --- a/src/lastfm.rs +++ b/src/lastfm.rs @@ -60,12 +60,7 @@ where let mut scrobbler = Scrobbler::new(LASTFM_API_KEY.into(), LASTFM_API_SECRET.into()); let auth_response = scrobbler.authenticate_with_token(token.to_string())?; - user::lastfm_link( - db, - username, - &auth_response.name, - &auth_response.key, - ) + user::lastfm_link(db, username, &auth_response.name, &auth_response.key) } pub fn unlink(db: &T, username: &str) -> Result<(), errors::Error>