mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Fixed some clippy warnings in components/script (#31950)
* Fixd some clippy warnings in components/script * Update node.rs Removed the ```# Safety ``` section. * Update shadow_root.rs Removed the ``` # Safety ``` section from components/script/layout_dom * Updated fixes to some clippy warnings in components/script * Revert "Updated fixes to some clippy warnings in components/script" This reverts commit2a37c3dec8
. * Updated fixes to clippy warnings in components/script * Revert "Updated fixes to clippy warnings in components/script" This reverts commit5780dc3a0a
. * Revert "Revert "Updated fixes to some clippy warnings in components/script"" This reverts commit98c411354a
. * Revert "Updated fixes to some clippy warnings in components/script" This reverts commit2a37c3dec8
. * Update shadow_root.rs (Ignore change) * Update node.rs (Ignore changes) * Updated fixes to clippy warnings in components/script * Removed trailing white space in componets/script/layout_dom_root.rs * Revert "Removed trailing white space in componets/script/layout_dom_root.rs" This reverts commit1976fd0405
. * Revert "Updated fixes to clippy warnings in components/script" This reverts commit5c71b925fb
. * Updated fixes to clippy warnings in components/script including review suggestions.
This commit is contained in:
parent
8c8d68e415
commit
c3360df918
2 changed files with 8 additions and 9 deletions
|
@ -2314,7 +2314,7 @@ impl Window {
|
||||||
self.Document().url()
|
self.Document().url()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_layout<'a, T>(&self, call: impl FnOnce(&mut dyn Layout) -> T) -> Result<T, ()> {
|
pub fn with_layout<T>(&self, call: impl FnOnce(&mut dyn Layout) -> T) -> Result<T, ()> {
|
||||||
ScriptThread::with_layout(self.pipeline_id(), call)
|
ScriptThread::with_layout(self.pipeline_id(), call)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2414,9 +2414,7 @@ impl Window {
|
||||||
reply: IpcSender<Option<TimelineMarker>>,
|
reply: IpcSender<Option<TimelineMarker>>,
|
||||||
) {
|
) {
|
||||||
*self.devtools_marker_sender.borrow_mut() = Some(reply);
|
*self.devtools_marker_sender.borrow_mut() = Some(reply);
|
||||||
self.devtools_markers
|
self.devtools_markers.borrow_mut().extend(markers);
|
||||||
.borrow_mut()
|
|
||||||
.extend(markers.into_iter());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn drop_devtools_timeline_markers(&self, markers: Vec<TimelineMarkerType>) {
|
pub fn drop_devtools_timeline_markers(&self, markers: Vec<TimelineMarkerType>) {
|
||||||
|
@ -2522,6 +2520,7 @@ impl Window {
|
||||||
|
|
||||||
impl Window {
|
impl Window {
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn new(
|
pub fn new(
|
||||||
runtime: Rc<Runtime>,
|
runtime: Rc<Runtime>,
|
||||||
script_chan: MainThreadScriptChan,
|
script_chan: MainThreadScriptChan,
|
||||||
|
|
|
@ -54,12 +54,12 @@ pub struct ServoLayoutNode<'dom, LayoutDataType: LayoutDataTrait> {
|
||||||
pub(super) phantom: PhantomData<LayoutDataType>,
|
pub(super) phantom: PhantomData<LayoutDataType>,
|
||||||
}
|
}
|
||||||
|
|
||||||
//// Those are supposed to be sound, but they aren't because the entire system
|
/// Those are supposed to be sound, but they aren't because the entire system
|
||||||
//// between script and layout so far has been designed to work around their
|
/// between script and layout so far has been designed to work around their
|
||||||
//// absence. Switching the entire thing to the inert crate infra will help.
|
/// absence. Switching the entire thing to the inert crate infra will help.
|
||||||
///
|
///
|
||||||
//// FIXME(mrobinson): These are required because Layout 2020 sends non-threadsafe
|
/// FIXME(mrobinson): These are required because Layout 2020 sends non-threadsafe
|
||||||
//// nodes to different threads. This should be adressed in a comprehensive way.
|
/// nodes to different threads. This should be adressed in a comprehensive way.
|
||||||
unsafe impl<LayoutDataType: LayoutDataTrait> Send for ServoLayoutNode<'_, LayoutDataType> {}
|
unsafe impl<LayoutDataType: LayoutDataTrait> Send for ServoLayoutNode<'_, LayoutDataType> {}
|
||||||
unsafe impl<LayoutDataType: LayoutDataTrait> Sync for ServoLayoutNode<'_, LayoutDataType> {}
|
unsafe impl<LayoutDataType: LayoutDataTrait> Sync for ServoLayoutNode<'_, LayoutDataType> {}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue