diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-23 14:36:40 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-23 14:36:40 +0100 |
| commit | 457ce954366f3a81989fee788c85a5b20a96ce96 (patch) | |
| tree | bb591fb025adcaaec424f9f52b39fb96af5ca17e /library/src/compute | |
| parent | a1d47695a2af5afa466c21ad812a1a8212780293 (diff) | |
More EcoVec usage
Frame unfortunately can't use it because splice is missing.
Diffstat (limited to 'library/src/compute')
| -rw-r--r-- | library/src/compute/construct.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/src/compute/construct.rs b/library/src/compute/construct.rs index a44d50c2..13ecf08d 100644 --- a/library/src/compute/construct.rs +++ b/library/src/compute/construct.rs @@ -1,5 +1,6 @@ use std::str::FromStr; +use ecow::EcoVec; use typst::model::Regex; use crate::prelude::*; @@ -275,7 +276,7 @@ castable! { /// construct #[func] pub fn symbol(args: &mut Args) -> SourceResult<Value> { - let mut list: Vec<(EcoString, char)> = vec![]; + let mut list = EcoVec::new(); for Spanned { v, span } in args.all::<Spanned<Variant>>()? { if list.iter().any(|(prev, _)| &v.0 == prev) { bail!(span, "duplicate variant"); |
