clippy: Fix all errors in components/script (#31911)

* clippy: Fix errors in components/script/dom

* clippy: fixed remaining errors in components/script
This commit is contained in:
Azhar Ismagulova 2024-03-28 09:03:18 +00:00 committed by GitHub
parent eccb60e548
commit f183170786
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 57 additions and 57 deletions

View file

@ -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()