mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-11 05:31:14 -03:00
Assert that FD monitor Drop implementation is really test-only
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user