Assert that FD monitor Drop implementation is really test-only

This commit is contained in:
Johannes Altmanninger
2026-04-27 20:40:52 +08:00
parent 1771a325aa
commit ff6ee65deb

View File

@@ -487,6 +487,10 @@ fn run(self) {
/// fds arounds; this is why it's very hacky!
impl Drop for FdMonitor {
fn drop(&mut self) {
#[allow(clippy::assertions_on_constants)]
{
assert!(cfg!(test));
}
self.data.locked.lock().expect("Mutex poisoned!").terminate = true;
self.change_signaller.post();