mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 09:49:31 +02:00
refactor: update to Rust 1.85 and edition 2024, use inline log args
- Update MSRV to 1.85 and Rust edition to 2024. - Refactor all logging macros to use inline argument formatting. - Fix import order in main.rs and examples. - Add async environment variable setter to main.rs as safe facade.
This commit is contained in:
parent
0aec38b07a
commit
6288e7e03c
30 changed files with 419 additions and 448 deletions
|
@ -124,7 +124,7 @@ impl HttpClient {
|
|||
);
|
||||
|
||||
let user_agent = HeaderValue::from_str(user_agent_str).unwrap_or_else(|err| {
|
||||
error!("Invalid user agent <{}>: {}", user_agent_str, err);
|
||||
error!("Invalid user agent <{user_agent_str}>: {err}");
|
||||
HeaderValue::from_static(FALLBACK_USER_AGENT)
|
||||
});
|
||||
|
||||
|
@ -176,7 +176,7 @@ impl HttpClient {
|
|||
}
|
||||
|
||||
pub async fn request(&self, req: Request<Bytes>) -> Result<Response<Incoming>, Error> {
|
||||
debug!("Requesting {}", req.uri().to_string());
|
||||
debug!("Requesting {}", req.uri());
|
||||
|
||||
// `Request` does not implement `Clone` because its `Body` may be a single-shot stream.
|
||||
// As correct as that may be technically, we now need all this boilerplate to clone it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue