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.
This commit is contained in:
Martin von Zweigbergk 2021-12-01 10:28:46 -08:00
parent 06bccb3387
commit 1f68de64d4
2 changed files with 2 additions and 2 deletions

View file

@ -156,7 +156,7 @@ impl UnpublishedOperation {
impl Drop for UnpublishedOperation { impl Drop for UnpublishedOperation {
fn drop(&mut self) { fn drop(&mut self) {
if !std::thread::panicking() { if !std::thread::panicking() {
debug_assert!( assert!(
self.closed, self.closed,
"UnpublishedOperation was dropped without being closed." "UnpublishedOperation was dropped without being closed."
); );

View file

@ -912,7 +912,7 @@ impl LockedWorkingCopy<'_> {
impl Drop for LockedWorkingCopy<'_> { impl Drop for LockedWorkingCopy<'_> {
fn drop(&mut self) { fn drop(&mut self) {
if !std::thread::panicking() { if !std::thread::panicking() {
debug_assert!( assert!(
self.closed, self.closed,
"Working copy lock was dropped without being closed." "Working copy lock was dropped without being closed."
); );