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 {
|
if let Some(imp) = &self.imp {
|
||||||
let elapsed = imp.start.elapsed();
|
let elapsed = imp.start.elapsed();
|
||||||
if elapsed > imp.timeout {
|
if elapsed > imp.timeout {
|
||||||
if imp
|
if match imp.print_message.compare_exchange(
|
||||||
.print_message
|
true,
|
||||||
.compare_and_swap(true, false, Ordering::SeqCst)
|
false,
|
||||||
{
|
Ordering::SeqCst,
|
||||||
|
Ordering::SeqCst,
|
||||||
|
) {
|
||||||
|
Ok(x) | Err(x) => x,
|
||||||
|
} {
|
||||||
warn!("Timed out after {} second(s)", elapsed.as_secs());
|
warn!("Timed out after {} second(s)", elapsed.as_secs());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue