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.
This commit is contained in:
Alex Crichton
2020-02-07 08:23:24 -06:00
committed by GitHub
parent f5b505de04
commit 151075d553

View File

@@ -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")]