From 1f68de64d425869c3abc195cc20f2d1e6b4e8e04 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 1 Dec 2021 10:28:46 -0800 Subject: [PATCH] debug: upgrade `Drop` implementations to non-debug `assert!` I think these remaining implementations of `Drop` are for types that are infrequently dropped (unlike `Transaction`), so it be fine to be more strict about them. --- lib/src/transaction.rs | 2 +- lib/src/working_copy.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/transaction.rs b/lib/src/transaction.rs index 425e5e2b4..98600d273 100644 --- a/lib/src/transaction.rs +++ b/lib/src/transaction.rs @@ -156,7 +156,7 @@ impl UnpublishedOperation { impl Drop for UnpublishedOperation { fn drop(&mut self) { if !std::thread::panicking() { - debug_assert!( + assert!( self.closed, "UnpublishedOperation was dropped without being closed." ); diff --git a/lib/src/working_copy.rs b/lib/src/working_copy.rs index f9d20f4cf..90d19f499 100644 --- a/lib/src/working_copy.rs +++ b/lib/src/working_copy.rs @@ -912,7 +912,7 @@ impl LockedWorkingCopy<'_> { impl Drop for LockedWorkingCopy<'_> { fn drop(&mut self) { if !std::thread::panicking() { - debug_assert!( + assert!( self.closed, "Working copy lock was dropped without being closed." );