mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Use Default for ExtraStyleData instead of Option.
This commit is contained in:
parent
9a1f20f1e8
commit
335ca47361
4 changed files with 18 additions and 13 deletions
|
@ -131,7 +131,7 @@ where
|
|||
pub pseudo_element_matching_fn: Option<&'a Fn(&Impl::PseudoElement) -> bool>,
|
||||
|
||||
/// Extra implementation-dependent matching data.
|
||||
pub extra_data: Option<Impl::ExtraMatchingData>,
|
||||
pub extra_data: Impl::ExtraMatchingData,
|
||||
|
||||
quirks_mode: QuirksMode,
|
||||
classes_and_ids_case_sensitivity: CaseSensitivity,
|
||||
|
@ -176,7 +176,7 @@ where
|
|||
scope_element: None,
|
||||
nesting_level: 0,
|
||||
pseudo_element_matching_fn: None,
|
||||
extra_data: None,
|
||||
extra_data: Default::default(),
|
||||
_impl: ::std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ macro_rules! with_all_bounds {
|
|||
/// are parameterized on SelectorImpl. See
|
||||
/// <https://github.com/rust-lang/rust/issues/26925>
|
||||
pub trait SelectorImpl: Clone + Sized + 'static {
|
||||
type ExtraMatchingData: Sized + 'static;
|
||||
type ExtraMatchingData: Sized + Default + 'static;
|
||||
type AttrValue: $($InSelector)*;
|
||||
type Identifier: $($InSelector)* + PrecomputedHash;
|
||||
type ClassName: $($InSelector)* + PrecomputedHash;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue