mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Fix compilation on Rust 1.48
This commit is contained in:
parent
d3074f597a
commit
4fe1183a80
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
|||
use hyper::{Body, Request};
|
||||
use serde::Deserialize;
|
||||
use std::error::Error;
|
||||
use std::hint;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
pub type SocketAddress = (String, u16);
|
||||
|
@ -115,7 +114,8 @@ impl ApResolver {
|
|||
// parallel and they will all call this function, while resolving is still in progress.
|
||||
self.lock(|inner| {
|
||||
while inner.spinlock.load(Ordering::SeqCst) != 0 {
|
||||
hint::spin_loop()
|
||||
#[allow(deprecated)]
|
||||
std::sync::atomic::spin_loop_hint()
|
||||
}
|
||||
inner.spinlock.store(1, Ordering::SeqCst);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue