mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
fix clippy errors
This commit is contained in:
parent
d7804386a0
commit
60f6451c2e
2 changed files with 2 additions and 3 deletions
|
@ -1382,7 +1382,6 @@ impl SpircTask {
|
|||
// has_shuffle/repeat seem to always be true in these replace msgs,
|
||||
// but to replicate the behaviour of the Android client we have to
|
||||
// ignore false values.
|
||||
let state = state;
|
||||
if state.repeat() {
|
||||
self.state.set_repeat(true);
|
||||
}
|
||||
|
|
|
@ -392,7 +392,7 @@ impl SpClient {
|
|||
) -> SpClientResult {
|
||||
let body = protobuf::text_format::print_to_string(message);
|
||||
|
||||
let mut headers = headers.unwrap_or_else(HeaderMap::new);
|
||||
let mut headers = headers.unwrap_or_default();
|
||||
headers.insert(
|
||||
CONTENT_TYPE,
|
||||
HeaderValue::from_static("application/x-protobuf"),
|
||||
|
@ -409,7 +409,7 @@ impl SpClient {
|
|||
headers: Option<HeaderMap>,
|
||||
body: Option<&str>,
|
||||
) -> SpClientResult {
|
||||
let mut headers = headers.unwrap_or_else(HeaderMap::new);
|
||||
let mut headers = headers.unwrap_or_default();
|
||||
headers.insert(ACCEPT, HeaderValue::from_static("application/json"));
|
||||
|
||||
self.request(method, endpoint, Some(headers), body).await
|
||||
|
|
Loading…
Reference in a new issue