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 /src/model/symbol.rs | |
| parent | a1d47695a2af5afa466c21ad812a1a8212780293 (diff) | |
More EcoVec usage
Frame unfortunately can't use it because splice is missing.
Diffstat (limited to 'src/model/symbol.rs')
| -rw-r--r-- | src/model/symbol.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/model/symbol.rs b/src/model/symbol.rs index fafebd99..73c41067 100644 --- a/src/model/symbol.rs +++ b/src/model/symbol.rs @@ -1,9 +1,8 @@ use std::cmp::Reverse; use std::collections::BTreeSet; use std::fmt::{self, Debug, Display, Formatter, Write}; -use std::sync::Arc; -use ecow::EcoString; +use ecow::{EcoString, EcoVec}; use crate::diag::StrResult; @@ -22,7 +21,7 @@ pub struct Symbol { enum Repr { Single(char), Static(&'static [(&'static str, char)]), - Runtime(Arc<Vec<(EcoString, char)>>), + Runtime(EcoVec<(EcoString, char)>), } impl Symbol { @@ -43,10 +42,10 @@ impl Symbol { /// Create a symbol with a runtime variant list. #[track_caller] - pub fn runtime(list: Vec<(EcoString, char)>) -> Self { + pub fn runtime(list: EcoVec<(EcoString, char)>) -> Self { debug_assert!(!list.is_empty()); Self { - repr: Repr::Runtime(Arc::new(list)), + repr: Repr::Runtime(list), modifiers: EcoString::new(), } } |
