aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/cell.rs
diff options
context:
space:
mode:
authorAzhar Ismagulova <31756707+azharcodeit@users.noreply.github.com>2024-03-28 09:03:18 +0000
committerGitHub <noreply@github.com>2024-03-28 09:03:18 +0000
commitf18317078601afad18188f1bad0a33e59ba8303c (patch)
treed89ed580167d13c1e3a09e9f2860a2ab8ea2db7e /components/script/dom/bindings/cell.rs
parenteccb60e548bf522c07546e3abfd55c9442181c6b (diff)
downloadservo-f18317078601afad18188f1bad0a33e59ba8303c.tar.gz
servo-f18317078601afad18188f1bad0a33e59ba8303c.zip
clippy: Fix all errors in `components/script` (#31911)
* clippy: Fix errors in components/script/dom * clippy: fixed remaining errors in components/script
Diffstat (limited to 'components/script/dom/bindings/cell.rs')
-rw-r--r--components/script/dom/bindings/cell.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/bindings/cell.rs b/components/script/dom/bindings/cell.rs
index a9fb9b9b9d3..d56465594ca 100644
--- a/components/script/dom/bindings/cell.rs
+++ b/components/script/dom/bindings/cell.rs
@@ -41,7 +41,7 @@ impl<T> DomRefCell<T> {
/// Borrow the contents for the purpose of script deallocation.
///
- #[allow(unsafe_code)]
+ #[allow(unsafe_code, clippy::mut_from_ref)]
pub unsafe fn borrow_for_script_deallocation(&self) -> &mut T {
assert_in_script();
&mut *self.value.as_ptr()
@@ -49,7 +49,7 @@ impl<T> DomRefCell<T> {
/// Mutably borrow a cell for layout. Ideally this would use
/// `RefCell::try_borrow_mut_unguarded` but that doesn't exist yet.
- #[allow(unsafe_code)]
+ #[allow(unsafe_code, clippy::mut_from_ref)]
pub unsafe fn borrow_mut_for_layout(&self) -> &mut T {
assert_in_layout();
&mut *self.value.as_ptr()