diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs index be0a8b80..e7880469 100644 --- a/connect/src/spirc.rs +++ b/connect/src/spirc.rs @@ -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); } diff --git a/core/src/spclient.rs b/core/src/spclient.rs index d6c5ffb1..fbb8ddc5 100644 --- a/core/src/spclient.rs +++ b/core/src/spclient.rs @@ -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, 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