mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting * Reformat all imports
This commit is contained in:
parent
413da4ca69
commit
aad2dccc9c
802 changed files with 6861 additions and 6395 deletions
|
@ -2,6 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::fmt;
|
||||
use std::result::Result;
|
||||
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_atoms::Atom;
|
||||
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::refcounted::Trusted;
|
||||
use crate::dom::event::{EventBubbles, EventCancelable, EventTask, SimpleEventTask};
|
||||
|
@ -10,10 +16,6 @@ use crate::dom::window::Window;
|
|||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_atoms::Atom;
|
||||
use std::fmt;
|
||||
use std::result::Result;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
pub struct DOMManipulationTaskSource(pub Box<dyn ScriptChan + Send>, #[no_trace] pub PipelineId);
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
use crate::dom::domexception::DOMErrorName;
|
||||
use crate::dom::filereader::{FileReader, GenerationId, ReadMetaData, TrustedFileReader};
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
pub struct FileReadingTaskSource(
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crossbeam_channel::Sender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
|
||||
use crate::script_thread::MainThreadScriptMsg;
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use crossbeam_channel::Sender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
#[derive(Clone, JSTraceable)]
|
||||
pub struct HistoryTraversalTaskSource(
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::fmt;
|
||||
use std::result::Result;
|
||||
|
||||
use crossbeam_channel::Sender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_atoms::Atom;
|
||||
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::refcounted::Trusted;
|
||||
use crate::dom::event::SimpleEventTask;
|
||||
|
@ -11,11 +18,6 @@ use crate::script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
|
|||
use crate::script_thread::MainThreadScriptMsg;
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use crossbeam_channel::Sender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_atoms::Atom;
|
||||
use std::fmt;
|
||||
use std::result::Result;
|
||||
|
||||
#[derive(Clone, JSTraceable)]
|
||||
pub struct MediaElementTaskSource(
|
||||
|
|
|
@ -14,10 +14,12 @@ pub mod timer;
|
|||
pub mod user_interaction;
|
||||
pub mod websocket;
|
||||
|
||||
use std::result::Result;
|
||||
|
||||
use enum_iterator::IntoEnumIterator;
|
||||
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use enum_iterator::IntoEnumIterator;
|
||||
use std::result::Result;
|
||||
|
||||
// The names of all task sources, used to differentiate TaskCancellers.
|
||||
// Note: When adding a task source, update this enum.
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
pub struct NetworkingTaskSource(
|
||||
|
|
|
@ -6,14 +6,16 @@
|
|||
// a low priority task and it should be processed during idle periods.
|
||||
// We are currently treating this task queue as a normal priority queue.
|
||||
|
||||
use std::fmt;
|
||||
use std::result::Result;
|
||||
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
use crate::dom::bindings::refcounted::Trusted;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use std::fmt;
|
||||
use std::result::Result;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
pub struct PerformanceTimelineTaskSource(
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::fmt;
|
||||
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use std::fmt;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
pub struct PortMessageQueue(
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
pub struct RemoteEventTaskSource(
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::fmt;
|
||||
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use std::fmt;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
/// https://html.spec.whatwg.org/multipage/#timer-task-source
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::fmt;
|
||||
use std::result::Result;
|
||||
|
||||
use crossbeam_channel::Sender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_atoms::Atom;
|
||||
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::refcounted::Trusted;
|
||||
use crate::dom::event::{EventBubbles, EventCancelable, EventTask};
|
||||
|
@ -11,11 +18,6 @@ use crate::script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
|
|||
use crate::script_thread::MainThreadScriptMsg;
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use crossbeam_channel::Sender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_atoms::Atom;
|
||||
use std::fmt;
|
||||
use std::result::Result;
|
||||
|
||||
#[derive(Clone, JSTraceable)]
|
||||
pub struct UserInteractionTaskSource(
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
|
||||
use crate::task::{TaskCanceller, TaskOnce};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
pub struct WebsocketTaskSource(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue