Fix Rust 1.50 clippy error
This commit is contained in:
parent
f8e4a8b170
commit
76da6b5468
1 changed files with 8 additions and 4 deletions
12
src/lib.rs
12
src/lib.rs
|
|
@ -785,10 +785,14 @@ 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 match imp.print_message.compare_exchange(
|
||||
true,
|
||||
false,
|
||||
Ordering::SeqCst,
|
||||
Ordering::SeqCst,
|
||||
) {
|
||||
Ok(x) | Err(x) => x,
|
||||
} {
|
||||
warn!("Timed out after {} second(s)", elapsed.as_secs());
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue