mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
style: Update style to arrayvec 0.7
Differential Revision: https://phabricator.services.mozilla.com/D147476
This commit is contained in:
parent
7bc667f6b4
commit
036b067d65
1 changed files with 6 additions and 8 deletions
|
@ -2593,9 +2593,11 @@ impl PropertyDeclaration {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type SubpropertiesVec<T> = ArrayVec<T, ${max(len(s.sub_properties) \
|
const SUB_PROPERTIES_ARRAY_CAP: usize =
|
||||||
for s in data.shorthands_except_all()) \
|
${max(len(s.sub_properties) for s in data.shorthands_except_all()) \
|
||||||
if data.shorthands_except_all() else 0}>;
|
if data.shorthands_except_all() else 0};
|
||||||
|
|
||||||
|
type SubpropertiesVec<T> = ArrayVec<T, SUB_PROPERTIES_ARRAY_CAP>;
|
||||||
|
|
||||||
/// A stack-allocated vector of `PropertyDeclaration`
|
/// A stack-allocated vector of `PropertyDeclaration`
|
||||||
/// large enough to parse one CSS `key: value` declaration.
|
/// large enough to parse one CSS `key: value` declaration.
|
||||||
|
@ -2655,11 +2657,7 @@ impl SourcePropertyDeclaration {
|
||||||
|
|
||||||
/// Return type of SourcePropertyDeclaration::drain
|
/// Return type of SourcePropertyDeclaration::drain
|
||||||
pub struct SourcePropertyDeclarationDrain<'a> {
|
pub struct SourcePropertyDeclarationDrain<'a> {
|
||||||
declarations: ArrayVecDrain<
|
declarations: ArrayVecDrain<'a, PropertyDeclaration, SUB_PROPERTIES_ARRAY_CAP>,
|
||||||
'a, PropertyDeclaration,
|
|
||||||
${max(len(s.sub_properties) for s in data.shorthands_except_all()) \
|
|
||||||
if data.shorthands_except_all() else 0}
|
|
||||||
>,
|
|
||||||
all_shorthand: AllShorthand,
|
all_shorthand: AllShorthand,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue