1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 09:49:31 +02:00

Remove unwraps from librespot-audio

This commit is contained in:
Roderick van Domburg 2021-12-18 23:44:13 +01:00
parent d18a0d1803
commit 0d51fd43dc
No known key found for this signature in database
GPG key ID: A9EF5222A26F0451
9 changed files with 301 additions and 165 deletions

View file

@ -14,7 +14,9 @@ use url::Url;
use std::env::consts::OS;
use crate::version::{SPOTIFY_MOBILE_VERSION, SPOTIFY_VERSION, VERSION_STRING};
use crate::version::{
FALLBACK_USER_AGENT, SPOTIFY_MOBILE_VERSION, SPOTIFY_VERSION, VERSION_STRING,
};
pub struct HttpClient {
user_agent: HeaderValue,
@ -64,8 +66,8 @@ impl HttpClient {
let user_agent = HeaderValue::from_str(user_agent_str).unwrap_or_else(|err| {
error!("Invalid user agent <{}>: {}", user_agent_str, err);
error!("Parts of the API will probably not work. Please report this as a bug.");
HeaderValue::from_static("")
error!("Please report this as a bug.");
HeaderValue::from_static(FALLBACK_USER_AGENT)
});
// configuring TLS is expensive and should be done once per process