diff options
| author | Sébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com> | 2023-10-17 20:50:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-17 20:50:36 +0200 |
| commit | 37a988af83e54c9351eadd2e7f8a1c32441fafb4 (patch) | |
| tree | 49472313db0a35adf4c59bc867793a627597e3a9 /crates/typst-syntax/src/node.rs | |
| parent | 77b84675e569dec3e1c29d17e9033a1d0c26dc23 (diff) | |
Replace `Vec` with `EcoVec`, removed `Box` (#2420)
Diffstat (limited to 'crates/typst-syntax/src/node.rs')
| -rw-r--r-- | crates/typst-syntax/src/node.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-syntax/src/node.rs b/crates/typst-syntax/src/node.rs index dd5deab2..9b73dd7f 100644 --- a/crates/typst-syntax/src/node.rs +++ b/crates/typst-syntax/src/node.rs @@ -3,7 +3,7 @@ use std::ops::{Deref, Range}; use std::rc::Rc; use std::sync::Arc; -use ecow::EcoString; +use ecow::{eco_vec, EcoString, EcoVec}; use super::ast::AstNode; use super::{FileId, Span, SyntaxKind}; @@ -616,7 +616,7 @@ impl ErrorNode { error: SyntaxError { span: Span::detached(), message: message.into(), - hints: vec![], + hints: eco_vec![], }, } } @@ -652,7 +652,7 @@ pub struct SyntaxError { pub message: EcoString, /// Additonal hints to the user, indicating how this error could be avoided /// or worked around. - pub hints: Vec<EcoString>, + pub hints: EcoVec<EcoString>, } impl SyntaxError { |
