Pattern matching works now
This commit is contained in:
@@ -2,6 +2,7 @@ use std::cell::RefCell;
|
||||
use std::fmt;
|
||||
use std::hash::Hash;
|
||||
use std::rc::Rc;
|
||||
use std::thread::panicking;
|
||||
|
||||
use async_once_cell::OnceCell;
|
||||
use derive_destructure::destructure;
|
||||
@@ -28,7 +29,7 @@ impl BorrowedExprStore {
|
||||
}
|
||||
impl Drop for BorrowedExprStore {
|
||||
fn drop(&mut self) {
|
||||
if self.0.borrow().is_some() {
|
||||
if self.0.borrow().is_some() && !panicking() {
|
||||
panic!("This should always be explicitly disposed")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user