fix clippy errors

This commit is contained in:
eladyn 2023-11-11 20:11:37 +01:00
parent d7804386a0
commit 60f6451c2e
No known key found for this signature in database
GPG key ID: 7AB85C6FA5573815
2 changed files with 2 additions and 3 deletions

View file

@ -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);
}

View file

@ -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