mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Fix clippy warning, use unwrap_or_default()
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
d7804386a0
commit
eae3a56c30
1 changed files with 2 additions and 2 deletions
|
@ -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