mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Provide safety check helpers in release builds
debug_assert! uses if cfg!(not(ndebug)) { ... } so the body in a release build is dead code, but it still needs to compile.
This commit is contained in:
parent
4dee8ecdf0
commit
f508a82582
2 changed files with 4 additions and 8 deletions
|
@ -46,7 +46,6 @@ impl<T> DOMRefCell<T> {
|
|||
/// Is the cell mutably borrowed?
|
||||
///
|
||||
/// For safety checks in debug builds only.
|
||||
#[cfg(not(ndebug))]
|
||||
pub fn is_mutably_borrowed(&self) -> bool {
|
||||
self.borrow.get() == WRITING
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue