summaryrefslogtreecommitdiff
path: root/src/eval/args.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-07-26 23:24:50 +0200
committerLaurenz <laurmaedje@gmail.com>2022-07-26 23:27:44 +0200
commitfc574b39454aec77cf2c33270566225917c7c823 (patch)
treeccebc217ce9f869bb0078753a7749789d77db551 /src/eval/args.rs
parent1e9a5eda48c65096b482b396d550d139a4c2e61d (diff)
New `Str` type with methods
Diffstat (limited to 'src/eval/args.rs')
-rw-r--r--src/eval/args.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/eval/args.rs b/src/eval/args.rs
index 4d280ff7..8d62b675 100644
--- a/src/eval/args.rs
+++ b/src/eval/args.rs
@@ -1,9 +1,8 @@
use std::fmt::{self, Debug, Formatter, Write};
-use super::{Array, Cast, Dict, Value};
+use super::{Array, Cast, Dict, Str, Value};
use crate::diag::{At, TypResult};
use crate::syntax::{Span, Spanned};
-use crate::util::EcoString;
/// Evaluated arguments to a function.
#[derive(Clone, PartialEq, Hash)]
@@ -20,7 +19,7 @@ pub struct Arg {
/// The span of the whole argument.
pub span: Span,
/// The name of the argument (`None` for positional arguments).
- pub name: Option<EcoString>,
+ pub name: Option<Str>,
/// The value of the argument.
pub value: Spanned<Value>,
}
@@ -177,7 +176,7 @@ impl Args {
}
/// Reinterpret these arguments as actually being a dictionary key.
- pub fn into_key(self) -> TypResult<EcoString> {
+ pub fn into_key(self) -> TypResult<Str> {
self.into_castable("key")
}