diff --git a/src/tools/rust-analyzer/crates/span/src/ast_id.rs b/src/tools/rust-analyzer/crates/span/src/ast_id.rs index da537ba9900c..599b3c717522 100644 --- a/src/tools/rust-analyzer/crates/span/src/ast_id.rs +++ b/src/tools/rust-analyzer/crates/span/src/ast_id.rs @@ -804,7 +804,7 @@ impl Drop for AstIdMap { // block on a receive _ = receiver.recv(); // then drain the entire channel - while let Ok(_) = receiver.try_recv() {} + while receiver.try_recv().is_ok() {} // and sleep for a bit std::thread::sleep(std::time::Duration::from_millis(100)); } diff --git a/src/tools/rust-analyzer/crates/span/src/map.rs b/src/tools/rust-analyzer/crates/span/src/map.rs index 75a1b0029cbc..dc7d471aa03a 100644 --- a/src/tools/rust-analyzer/crates/span/src/map.rs +++ b/src/tools/rust-analyzer/crates/span/src/map.rs @@ -168,7 +168,7 @@ impl Drop for SpanMap { // block on a receive _ = receiver.recv(); // then drain the entire channel - while let Ok(_) = receiver.try_recv() {} + while receiver.try_recv().is_ok() {} // and sleep for a bit std::thread::sleep(std::time::Duration::from_millis(100)); } diff --git a/src/tools/rust-analyzer/crates/syntax/src/lib.rs b/src/tools/rust-analyzer/crates/syntax/src/lib.rs index d36019514016..c510b2831e12 100644 --- a/src/tools/rust-analyzer/crates/syntax/src/lib.rs +++ b/src/tools/rust-analyzer/crates/syntax/src/lib.rs @@ -223,7 +223,7 @@ impl Drop for Parse { // block on a receive _ = receiver.recv(); // then drain the entire channel - while let Ok(_) = receiver.try_recv() {} + while receiver.try_recv().is_ok() {} // and sleep for a bit std::thread::sleep(std::time::Duration::from_millis(100)); }