From 151075d55376932f072d10df1bf17df135c68338 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 7 Feb 2020 08:23:24 -0600 Subject: [PATCH] Remove a panic in the cache worker (#922) This panic can now be hit occasionally since the worker is indeed dropped, and the comment about the static no longer applies. --- crates/environ/src/cache/worker.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crates/environ/src/cache/worker.rs b/crates/environ/src/cache/worker.rs index 047276b83f..f17ffa4103 100644 --- a/crates/environ/src/cache/worker.rs +++ b/crates/environ/src/cache/worker.rs @@ -217,12 +217,6 @@ impl WorkerThread { condvar.notify_all(); } } - - // The receiver can stop iteration iff the channel has hung up. - // The channel will hung when sender is dropped. It only happens in tests. - // In non-test case we have static worker and Rust doesn't drop static variables. - #[cfg(not(test))] - unreachable!() } #[cfg(target_os = "windows")]