Updated fixes to clippy warnings in components/script

This commit is contained in:
jahielkomu 2024-03-31 19:14:05 +03:00
parent 98c411354a
commit 5780dc3a0a
3 changed files with 2 additions and 6 deletions

View file

@ -2520,6 +2520,7 @@ impl Window {
impl Window {
#[allow(unsafe_code)]
#[allow(clippy::too_many_arguments)]
pub fn new(
runtime: Rc<Runtime>,
script_chan: MainThreadScriptChan,

View file

@ -97,9 +97,7 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoLayoutNode<'dom, LayoutDataType
phantom: PhantomData,
}
}
/// # Safety
///
/// This function should not be called if there is no TrustedNodeAddress.
pub unsafe fn new(address: &TrustedNodeAddress) -> Self {
ServoLayoutNode::from_layout_js(LayoutDom::from_trusted_node_address(*address))
}

View file

@ -71,9 +71,6 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoShadowRoot<'dom, LayoutDataType
}
}
/// # Safety
///
/// This function should not mutate StyleSharedRwLockReadGuard.
pub unsafe fn flush_stylesheets(
&self,
stylist: &mut Stylist,