Bug 1953074 Upgrade style_traits crate to edition 2021 (r=emilio)
Signed-off-by: Nico Burns <nico@nicoburns.com> Differential Revision: https://phabricator.services.mozilla.com/D240976
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -6185,7 +6185,6 @@ dependencies = [
|
|||||||
"bitflags 2.9.0",
|
"bitflags 2.9.0",
|
||||||
"cssparser",
|
"cssparser",
|
||||||
"euclid",
|
"euclid",
|
||||||
"lazy_static",
|
|
||||||
"malloc_size_of",
|
"malloc_size_of",
|
||||||
"malloc_size_of_derive",
|
"malloc_size_of_derive",
|
||||||
"nsstring",
|
"nsstring",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ version = "0.0.1"
|
|||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
repository = "https://github.com/servo/stylo"
|
repository = "https://github.com/servo/stylo"
|
||||||
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@@ -19,7 +20,6 @@ app_units = "0.7"
|
|||||||
bitflags = "2"
|
bitflags = "2"
|
||||||
cssparser = "0.34"
|
cssparser = "0.34"
|
||||||
euclid = "0.22"
|
euclid = "0.22"
|
||||||
lazy_static = "1"
|
|
||||||
malloc_size_of = { path = "../malloc_size_of" }
|
malloc_size_of = { path = "../malloc_size_of" }
|
||||||
malloc_size_of_derive = { path = "../../../xpcom/rust/malloc_size_of_derive" }
|
malloc_size_of_derive = { path = "../../../xpcom/rust/malloc_size_of_derive" }
|
||||||
nsstring = {path = "../../../xpcom/rust/nsstring/", optional = true}
|
nsstring = {path = "../../../xpcom/rust/nsstring/", optional = true}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ use serde::ser::{Serialize, Serializer};
|
|||||||
use servo_arc::ThinArc;
|
use servo_arc::ThinArc;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::ptr::NonNull;
|
use std::ptr::NonNull;
|
||||||
|
use std::sync::LazyLock;
|
||||||
use std::{iter, mem, hash::{Hash, Hasher}};
|
use std::{iter, mem, hash::{Hash, Hasher}};
|
||||||
|
|
||||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps, MallocUnconditionalSizeOf};
|
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps, MallocUnconditionalSizeOf};
|
||||||
@@ -44,12 +45,9 @@ impl<T> Clone for ArcSlice<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lazy_static! {
|
|
||||||
// ThinArc doesn't support alignments greater than align_of::<u64>.
|
// ThinArc doesn't support alignments greater than align_of::<u64>.
|
||||||
static ref EMPTY_ARC_SLICE: ArcSlice<u64> = {
|
static EMPTY_ARC_SLICE: LazyLock<ArcSlice<u64>> =
|
||||||
ArcSlice::from_iter_leaked(iter::empty())
|
LazyLock::new(|| ArcSlice::from_iter_leaked(iter::empty()));
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<T> Default for ArcSlice<T> {
|
impl<T> Default for ArcSlice<T> {
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
|
|||||||
@@ -10,31 +10,16 @@
|
|||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
#![deny(unsafe_code, missing_docs)]
|
#![deny(unsafe_code, missing_docs)]
|
||||||
|
|
||||||
extern crate app_units;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate bitflags;
|
|
||||||
extern crate cssparser;
|
|
||||||
extern crate euclid;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate lazy_static;
|
|
||||||
extern crate malloc_size_of;
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate malloc_size_of_derive;
|
extern crate malloc_size_of_derive;
|
||||||
#[cfg(feature = "gecko")]
|
|
||||||
extern crate nsstring;
|
|
||||||
extern crate selectors;
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate serde;
|
extern crate serde;
|
||||||
extern crate servo_arc;
|
|
||||||
#[cfg(feature = "servo")]
|
|
||||||
extern crate servo_atoms;
|
|
||||||
extern crate thin_vec;
|
|
||||||
extern crate to_shmem;
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate to_shmem_derive;
|
extern crate to_shmem_derive;
|
||||||
#[cfg(feature = "servo")]
|
#[cfg(feature = "servo")]
|
||||||
extern crate url;
|
extern crate url;
|
||||||
|
|
||||||
|
use bitflags::bitflags;
|
||||||
use cssparser::{CowRcStr, Token};
|
use cssparser::{CowRcStr, Token};
|
||||||
use selectors::parser::SelectorParseErrorKind;
|
use selectors::parser::SelectorParseErrorKind;
|
||||||
#[cfg(feature = "servo")]
|
#[cfg(feature = "servo")]
|
||||||
|
|||||||
Reference in New Issue
Block a user