diff options
Diffstat (limited to 'src/spotify.rs')
-rw-r--r-- | src/spotify.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/spotify.rs b/src/spotify.rs index 04a82bc..5d2dc8c 100644 --- a/src/spotify.rs +++ b/src/spotify.rs @@ -116,7 +116,9 @@ fn generate_random_uuid(length: usize) -> String { pub async fn auth_user(name: &str, code: &str) -> Result<(String, Spotify), Error> { let (user, mut spotify) = { let mut guard = (*CACHE).lock()?; - guard.remove(name)? + guard + .remove(name) + .ok_or(Error::Misc("failed to remove user from waitlist".into()))? }; println!("auth: {:?} url: {}", name, code); spotify.request_user_token(code).await?; |