mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Remove superfluous status check
This commit is contained in:
parent
e1e265179f
commit
ce4f8dc288
1 changed files with 9 additions and 14 deletions
|
@ -78,8 +78,6 @@ impl TokenProvider {
|
||||||
);
|
);
|
||||||
let request = self.session().mercury().get(query_uri);
|
let request = self.session().mercury().get(query_uri);
|
||||||
let response = request.await?;
|
let response = request.await?;
|
||||||
|
|
||||||
if response.status_code == 200 {
|
|
||||||
let data = response
|
let data = response
|
||||||
.payload
|
.payload
|
||||||
.first()
|
.first()
|
||||||
|
@ -89,9 +87,6 @@ impl TokenProvider {
|
||||||
trace!("Got token: {:?}", token);
|
trace!("Got token: {:?}", token);
|
||||||
self.lock(|inner| inner.tokens.push(token.clone()));
|
self.lock(|inner| inner.tokens.push(token.clone()));
|
||||||
Ok(token)
|
Ok(token)
|
||||||
} else {
|
|
||||||
Err(MercuryError)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue