Skip to content

Commit

Permalink
fix clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eladyn committed Nov 15, 2023
1 parent d780438 commit 60f6451
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion connect/src/spirc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/spclient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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
Expand Down

0 comments on commit 60f6451

Please sign in to comment.