summaryrefslogtreecommitdiff
path: root/src/eval/cast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/cast.rs')
-rw-r--r--src/eval/cast.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval/cast.rs b/src/eval/cast.rs
index 806f7e92..ac23bd3a 100644
--- a/src/eval/cast.rs
+++ b/src/eval/cast.rs
@@ -8,6 +8,7 @@ use ecow::EcoString;
use super::{Array, Str, Value};
use crate::diag::StrResult;
use crate::syntax::Spanned;
+use crate::util::separated_list;
/// Cast from a value to a specific type.
pub trait Cast<V = Value>: Sized {
@@ -284,7 +285,7 @@ impl CastInfo {
msg.push_str(" nothing");
}
- crate::diag::comma_list(&mut msg, &parts, "or");
+ msg.push_str(&separated_list(&parts, "or"));
if !matching_type {
msg.push_str(", found ");