mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 01:39:28 +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
|
@ -419,7 +419,7 @@ fn launch_libmdns(
|
|||
};
|
||||
|
||||
if let Err(e) = inner() {
|
||||
log::error!("libmdns error: {}", e);
|
||||
log::error!("libmdns error: {e}");
|
||||
let _ = status_tx.send(DiscoveryEvent::ZeroconfError(e));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -170,7 +170,7 @@ impl RequestHandler {
|
|||
.map_err(|_| DiscoveryError::HmacError(base_key.to_vec()))?;
|
||||
h.update(encrypted);
|
||||
if h.verify_slice(cksum).is_err() {
|
||||
warn!("Login error for user {:?}: MAC mismatch", username);
|
||||
warn!("Login error for user {username:?}: MAC mismatch");
|
||||
let result = json!({
|
||||
"status": 102,
|
||||
"spotifyError": 1,
|
||||
|
@ -314,7 +314,7 @@ impl DiscoveryServer {
|
|||
discovery
|
||||
.clone()
|
||||
.handle(request)
|
||||
.inspect_err(|e| error!("could not handle discovery request: {}", e))
|
||||
.inspect_err(|e| error!("could not handle discovery request: {e}"))
|
||||
.and_then(|x| async move { Ok(x) })
|
||||
.map(Result::unwrap) // guaranteed by `and_then` above
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue