Avoid deprecated method

This commit is contained in:
Kornel 2021-02-24 18:46:45 +00:00
parent fafc7faeee
commit 6c2efe0152

View file

@ -785,10 +785,12 @@ impl Deadline {
if let Some(imp) = &self.imp {
let elapsed = imp.start.elapsed();
if elapsed > imp.timeout {
if imp
.print_message
.compare_and_swap(true, false, Ordering::SeqCst)
{
if imp.print_message.compare_exchange(
true,
false,
Ordering::SeqCst,
Ordering::SeqCst,
) {
warn!("Timed out after {} second(s)", elapsed.as_secs());
}
return true;