From da3b3e3985621ffd2f6d9b65583f4f498190402c Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 18 Jun 2020 12:56:33 -0400 Subject: [PATCH] Fix refcell_backtrace feature. --- components/script/dom/bindings/cell.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/script/dom/bindings/cell.rs b/components/script/dom/bindings/cell.rs index a9aa8119fa9..7d567e04847 100644 --- a/components/script/dom/bindings/cell.rs +++ b/components/script/dom/bindings/cell.rs @@ -75,8 +75,7 @@ impl DomRefCell { /// /// Panics if the value is currently mutably borrowed. pub fn borrow(&self) -> Ref { - self.try_borrow() - .expect("DomRefCell already mutably borrowed") + self.value.borrow() } /// Mutably borrows the wrapped value. @@ -90,8 +89,7 @@ impl DomRefCell { /// /// Panics if the value is currently borrowed. pub fn borrow_mut(&self) -> RefMut { - self.try_borrow_mut() - .expect("DomRefCell already borrowed") + self.value.borrow_mut() } /// Attempts to immutably borrow the wrapped value.