From 4fe1183a8050bd1e768e625e47d3a5ff0254e262 Mon Sep 17 00:00:00 2001 From: Roderick van Domburg Date: Tue, 22 Jun 2021 21:54:50 +0200 Subject: [PATCH] Fix compilation on Rust 1.48 --- core/src/apresolve.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/apresolve.rs b/core/src/apresolve.rs index d82c3abc..623c7cb3 100644 --- a/core/src/apresolve.rs +++ b/core/src/apresolve.rs @@ -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); });