mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +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
|
@ -4,16 +4,16 @@
|
|||
|
||||
//! A thin atomically-reference-counted slice.
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use serde::de::{Deserialize, Deserializer};
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use servo_arc::ThinArc;
|
||||
use std::ops::Deref;
|
||||
use std::ptr::NonNull;
|
||||
use std::{iter, mem};
|
||||
use to_shmem_derive::ToShmem;
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps, MallocUnconditionalSizeOf};
|
||||
use serde::de::{Deserialize, Deserializer};
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use servo_arc::ThinArc;
|
||||
use to_shmem_derive::ToShmem;
|
||||
|
||||
/// A canary that we stash in ArcSlices.
|
||||
///
|
||||
|
|
|
@ -11,17 +11,16 @@
|
|||
#![deny(unsafe_code, missing_docs)]
|
||||
|
||||
use bitflags::bitflags;
|
||||
use cssparser::{CowRcStr, Token};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use selectors::parser::SelectorParseErrorKind;
|
||||
use serde::{Deserialize, Serialize};
|
||||
#[cfg(feature = "servo")]
|
||||
use servo_atoms::Atom;
|
||||
use size_of_test::size_of_test;
|
||||
#[cfg(feature = "servo")]
|
||||
pub use webrender_api::units::DevicePixel;
|
||||
|
||||
use cssparser::{CowRcStr, Token};
|
||||
use selectors::parser::SelectorParseErrorKind;
|
||||
#[cfg(feature = "servo")]
|
||||
use servo_atoms::Atom;
|
||||
|
||||
/// One hardware pixel.
|
||||
///
|
||||
/// This unit corresponds to the smallest addressable element of the display hardware.
|
||||
|
|
|
@ -6,13 +6,14 @@
|
|||
|
||||
//! A replacement for `Box<[T]>` that cbindgen can understand.
|
||||
|
||||
use malloc_size_of::{MallocShallowSizeOf, MallocSizeOf, MallocSizeOfOps};
|
||||
use serde::de::{Deserialize, Deserializer};
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::ptr::NonNull;
|
||||
use std::{fmt, iter, mem, slice};
|
||||
|
||||
use malloc_size_of::{MallocShallowSizeOf, MallocSizeOf, MallocSizeOfOps};
|
||||
use serde::de::{Deserialize, Deserializer};
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use to_shmem::{self, SharedMemoryBuilder, ToShmem};
|
||||
|
||||
/// A struct that basically replaces a `Box<[T]>`, but which cbindgen can
|
||||
|
|
|
@ -6,12 +6,14 @@
|
|||
|
||||
//! A replacement for `Box<str>` that has a defined layout for FFI.
|
||||
|
||||
use crate::owned_slice::OwnedSlice;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use std::fmt;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use to_shmem_derive::ToShmem;
|
||||
|
||||
use crate::owned_slice::OwnedSlice;
|
||||
|
||||
/// A struct that basically replaces a Box<str>, but with a defined layout,
|
||||
/// suitable for FFI.
|
||||
#[repr(C)]
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
|
||||
//! Value information for devtools.
|
||||
|
||||
use crate::arc_slice::ArcSlice;
|
||||
use crate::owned_slice::OwnedSlice;
|
||||
use servo_arc::Arc;
|
||||
use std::ops::Range;
|
||||
use std::sync::Arc as StdArc;
|
||||
|
||||
use servo_arc::Arc;
|
||||
|
||||
use crate::arc_slice::ArcSlice;
|
||||
use crate::owned_slice::OwnedSlice;
|
||||
|
||||
/// Type of value that a property supports. This is used by Gecko's
|
||||
/// devtools to make sense about value it parses, and types listed
|
||||
/// here should match InspectorPropertyType in InspectorUtils.webidl.
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
|
||||
//! Helper types and traits for the handling of CSS values.
|
||||
|
||||
use app_units::Au;
|
||||
use cssparser::ToCss as CssparserToCss;
|
||||
use cssparser::{serialize_string, ParseError, Parser, Token, UnicodeRange};
|
||||
use servo_arc::Arc;
|
||||
use std::fmt::{self, Write};
|
||||
|
||||
use app_units::Au;
|
||||
use cssparser::{
|
||||
serialize_string, ParseError, Parser, ToCss as CssparserToCss, Token, UnicodeRange,
|
||||
};
|
||||
use servo_arc::Arc;
|
||||
|
||||
/// Serialises a value according to its CSS representation.
|
||||
///
|
||||
/// This trait is implemented for `str` and its friends, serialising the string
|
||||
|
@ -562,10 +564,11 @@ macro_rules! define_css_keyword_enum {
|
|||
|
||||
/// Helper types for the handling of specified values.
|
||||
pub mod specified {
|
||||
use crate::ParsingMode;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::ParsingMode;
|
||||
|
||||
/// Whether to allow negative lengths or not.
|
||||
#[repr(u8)]
|
||||
#[derive(
|
||||
|
|
|
@ -4,14 +4,16 @@
|
|||
|
||||
//! Helper types for the `@viewport` rule.
|
||||
|
||||
use crate::{CSSPixel, CssWriter, ParseError, PinchZoomFactor, ToCss};
|
||||
use std::fmt::{self, Write};
|
||||
|
||||
use cssparser::*;
|
||||
use euclid::Size2D;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt::{self, Write};
|
||||
use to_shmem_derive::ToShmem;
|
||||
|
||||
use crate::{CSSPixel, CssWriter, ParseError, PinchZoomFactor, ToCss};
|
||||
|
||||
define_css_keyword_enum! {
|
||||
pub enum UserZoom {
|
||||
Zoom = "zoom",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue