diff --git a/src/net/system.rs b/src/net/system.rs index c35e75d..4f53de1 100644 --- a/src/net/system.rs +++ b/src/net/system.rs @@ -628,47 +628,6 @@ impl From for Net { } } -impl Drop for MockNet { - #[cfg_attr(test, mutants::skip)] - #[tracing::instrument] - fn drop(&mut self) { - // Don't assert during panic to avoid double panic - if std::thread::panicking() { - return; - } - let unused = self.plans.take(); - if !unused.is_empty() { - log_unused_plans(&unused); - assert!( - unused.is_empty(), - "{} expected requests were not made", - unused.len() - ); - } - } -} -impl Drop for Net { - #[cfg_attr(test, mutants::skip)] - #[tracing::instrument] - fn drop(&mut self) { - // Don't assert during panic to avoid double panic - if std::thread::panicking() { - return; - } - if let Some(plans) = &self.plans { - let unused = plans.try_lock().expect("lock plans").take(); - if !unused.is_empty() { - log_unused_plans(&unused); - assert!( - unused.is_empty(), - "{} expected requests were not made", - unused.len() - ); - } - } - } -} - #[cfg_attr(test, mutants::skip)] fn log_unused_plans(unused: &[Plan]) { if !unused.is_empty() {