mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix refcell_backtrace feature.
This commit is contained in:
parent
06c948eab3
commit
da3b3e3985
1 changed files with 2 additions and 4 deletions
|
@ -75,8 +75,7 @@ impl<T> DomRefCell<T> {
|
|||
///
|
||||
/// Panics if the value is currently mutably borrowed.
|
||||
pub fn borrow(&self) -> Ref<T> {
|
||||
self.try_borrow()
|
||||
.expect("DomRefCell<T> already mutably borrowed")
|
||||
self.value.borrow()
|
||||
}
|
||||
|
||||
/// Mutably borrows the wrapped value.
|
||||
|
@ -90,8 +89,7 @@ impl<T> DomRefCell<T> {
|
|||
///
|
||||
/// Panics if the value is currently borrowed.
|
||||
pub fn borrow_mut(&self) -> RefMut<T> {
|
||||
self.try_borrow_mut()
|
||||
.expect("DomRefCell<T> already borrowed")
|
||||
self.value.borrow_mut()
|
||||
}
|
||||
|
||||
/// Attempts to immutably borrow the wrapped value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue