mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Upgrade remaining components to edition 2018
This commit is contained in:
parent
fd79367491
commit
9c2cc05a8e
48 changed files with 102 additions and 160 deletions
|
@ -9,6 +9,7 @@ readme = "README.md"
|
|||
keywords = ["css", "selectors"]
|
||||
license = "MPL-2.0"
|
||||
build = "build.rs"
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
name = "selectors"
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
use crate::parser::SelectorImpl;
|
||||
use cssparser::ToCss;
|
||||
use std::fmt;
|
||||
#[cfg(feature = "shmem")]
|
||||
use to_shmem_derive::ToShmem;
|
||||
|
||||
#[derive(Clone, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "shmem", derive(ToShmem))]
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
* 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/. */
|
||||
|
||||
extern crate phf_codegen;
|
||||
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::io::{BufWriter, Write};
|
||||
|
|
|
@ -19,12 +19,16 @@
|
|||
|
||||
use crate::parser::{Combinator, Component, SelectorImpl};
|
||||
use crate::sink::Push;
|
||||
use bitflags::bitflags;
|
||||
use derive_more::{Add, AddAssign};
|
||||
use servo_arc::{Arc, HeaderWithLength, ThinArc};
|
||||
use smallvec::{self, SmallVec};
|
||||
use std::cmp;
|
||||
use std::iter;
|
||||
use std::ptr;
|
||||
use std::slice;
|
||||
#[cfg(feature = "shmem")]
|
||||
use to_shmem_derive::ToShmem;
|
||||
|
||||
/// Top-level SelectorBuilder struct. This should be stack-allocated by the
|
||||
/// consumer and never moved (because it contains a lot of inline data that
|
||||
|
|
|
@ -5,25 +5,6 @@
|
|||
// Make |cargo bench| work.
|
||||
#![cfg_attr(feature = "bench", feature(test))]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
#[macro_use]
|
||||
extern crate cssparser;
|
||||
#[macro_use]
|
||||
extern crate derive_more;
|
||||
extern crate fxhash;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate phf;
|
||||
extern crate precomputed_hash;
|
||||
extern crate servo_arc;
|
||||
extern crate smallvec;
|
||||
#[cfg(feature = "shmem")]
|
||||
extern crate to_shmem;
|
||||
#[cfg(feature = "shmem")]
|
||||
#[macro_use]
|
||||
extern crate to_shmem_derive;
|
||||
|
||||
pub mod attr;
|
||||
pub mod bloom;
|
||||
mod builder;
|
||||
|
|
|
@ -8,6 +8,8 @@ use crate::nth_index_cache::NthIndexCacheInner;
|
|||
use crate::parser::{AncestorHashes, Combinator, Component, LocalName};
|
||||
use crate::parser::{NonTSPseudoClass, Selector, SelectorImpl, SelectorIter, SelectorList};
|
||||
use crate::tree::Element;
|
||||
use bitflags::bitflags;
|
||||
use log::debug;
|
||||
use smallvec::SmallVec;
|
||||
use std::borrow::Borrow;
|
||||
use std::iter;
|
||||
|
|
|
@ -10,7 +10,8 @@ use crate::builder::{SelectorBuilder, SelectorFlags, SpecificityAndFlags};
|
|||
use crate::context::QuirksMode;
|
||||
use crate::sink::Push;
|
||||
pub use crate::visitor::SelectorVisitor;
|
||||
use cssparser::parse_nth;
|
||||
use bitflags::bitflags;
|
||||
use cssparser::{match_ignore_ascii_case, parse_nth, *};
|
||||
use cssparser::{BasicParseError, BasicParseErrorKind, ParseError, ParseErrorKind};
|
||||
use cssparser::{CowRcStr, Delimiter, SourceLocation};
|
||||
use cssparser::{Parser as CssParser, ToCss, Token};
|
||||
|
@ -21,6 +22,8 @@ use std::borrow::{Borrow, Cow};
|
|||
use std::fmt::{self, Debug};
|
||||
use std::iter::Rev;
|
||||
use std::slice;
|
||||
#[cfg(feature = "shmem")]
|
||||
use to_shmem_derive::ToShmem;
|
||||
|
||||
/// A trait that represents a pseudo-element.
|
||||
pub trait PseudoElement: Sized + ToCss {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue