Skip to content

Commit 60f6451

Browse files
committed
fix clippy errors
1 parent d780438 commit 60f6451

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

connect/src/spirc.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,6 @@ impl SpircTask {
13821382
// has_shuffle/repeat seem to always be true in these replace msgs,
13831383
// but to replicate the behaviour of the Android client we have to
13841384
// ignore false values.
1385-
let state = state;
13861385
if state.repeat() {
13871386
self.state.set_repeat(true);
13881387
}

core/src/spclient.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ impl SpClient {
392392
) -> SpClientResult {
393393
let body = protobuf::text_format::print_to_string(message);
394394

395-
let mut headers = headers.unwrap_or_else(HeaderMap::new);
395+
let mut headers = headers.unwrap_or_default();
396396
headers.insert(
397397
CONTENT_TYPE,
398398
HeaderValue::from_static("application/x-protobuf"),
@@ -409,7 +409,7 @@ impl SpClient {
409409
headers: Option<HeaderMap>,
410410
body: Option<&str>,
411411
) -> SpClientResult {
412-
let mut headers = headers.unwrap_or_else(HeaderMap::new);
412+
let mut headers = headers.unwrap_or_default();
413413
headers.insert(ACCEPT, HeaderValue::from_static("application/json"));
414414

415415
self.request(method, endpoint, Some(headers), body).await

0 commit comments

Comments
 (0)