summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/src/compute/construct.rs3
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");