mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update arrayvec.
This commit is contained in:
parent
72fd95f613
commit
a7c87af9ca
8 changed files with 21 additions and 20 deletions
|
@ -31,7 +31,7 @@ gecko_profiler = []
|
|||
|
||||
[dependencies]
|
||||
app_units = "0.7"
|
||||
arrayvec = "0.5"
|
||||
arrayvec = "0.7"
|
||||
atomic_refcell = "0.1"
|
||||
bitflags = "1.0"
|
||||
byteorder = "1.0"
|
||||
|
|
|
@ -69,7 +69,7 @@ pub const WORK_UNIT_MAX: usize = 16;
|
|||
|
||||
/// A set of nodes, sized to the work unit. This gets copied when sent to other
|
||||
/// threads, so we keep it compact.
|
||||
type WorkUnit<N> = ArrayVec<[SendNode<N>; WORK_UNIT_MAX]>;
|
||||
type WorkUnit<N> = ArrayVec<SendNode<N>, WORK_UNIT_MAX>;
|
||||
|
||||
/// A callback to create our thread local context. This needs to be
|
||||
/// out of line so we don't allocate stack space for the entire struct
|
||||
|
|
|
@ -2534,11 +2534,8 @@ impl PropertyDeclaration {
|
|||
}
|
||||
}
|
||||
|
||||
type SubpropertiesArray<T> =
|
||||
[T; ${max(len(s.sub_properties) for s in data.shorthands_except_all()) \
|
||||
if data.shorthands_except_all() else 0}];
|
||||
|
||||
type SubpropertiesVec<T> = ArrayVec<SubpropertiesArray<T>>;
|
||||
type SubpropertiesVec<T> = ArrayVec<T, ${max(len(s.sub_properties) for s in data.shorthands_except_all()) \
|
||||
if data.shorthands_except_all() else 0}>;
|
||||
|
||||
/// A stack-allocated vector of `PropertyDeclaration`
|
||||
/// large enough to parse one CSS `key: value` declaration.
|
||||
|
@ -2594,7 +2591,8 @@ impl SourcePropertyDeclaration {
|
|||
|
||||
/// Return type of SourcePropertyDeclaration::drain
|
||||
pub struct SourcePropertyDeclarationDrain<'a> {
|
||||
declarations: ArrayVecDrain<'a, SubpropertiesArray<PropertyDeclaration>>,
|
||||
declarations: ArrayVecDrain<'a, PropertyDeclaration, ${max(len(s.sub_properties) for s in data.shorthands_except_all()) \
|
||||
if data.shorthands_except_all() else 0}>,
|
||||
all_shorthand: AllShorthand,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue