diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-01 11:27:10 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-01 11:27:10 +0100 |
| commit | ab841188e3d2687ee8f436336e6fde337985a83e (patch) | |
| tree | 23504e66ea84e62e4354fa76ac199fc1ff658e8a /src/model/value.rs | |
| parent | 8f246406c61f3710fa6659e85d7c715b001ea05d (diff) | |
Bump `ecow`
Diffstat (limited to 'src/model/value.rs')
| -rw-r--r-- | src/model/value.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/model/value.rs b/src/model/value.rs index 5c0ab618..f6ab95de 100644 --- a/src/model/value.rs +++ b/src/model/value.rs @@ -4,7 +4,7 @@ use std::fmt::{self, Debug, Formatter}; use std::hash::{Hash, Hasher}; use std::sync::Arc; -use ecow::{format_eco, EcoString}; +use ecow::{eco_format, EcoString}; use siphasher::sip128::{Hasher128, SipHasher}; use super::{ @@ -122,9 +122,9 @@ impl Value { Self::Dict(dict) => dict.at(&field).cloned(), Self::Content(content) => content .field(&field) - .ok_or_else(|| format_eco!("unknown field `{field}`")), + .ok_or_else(|| eco_format!("unknown field `{field}`")), Self::Module(module) => module.get(&field).cloned(), - v => Err(format_eco!("cannot access fields on type {}", v.type_name())), + v => Err(eco_format!("cannot access fields on type {}", v.type_name())), } } @@ -146,8 +146,8 @@ impl Value { pub fn display(self) -> Content { match self { Self::None => Content::empty(), - Self::Int(v) => item!(text)(format_eco!("{}", v)), - Self::Float(v) => item!(text)(format_eco!("{}", v)), + Self::Int(v) => item!(text)(eco_format!("{}", v)), + Self::Float(v) => item!(text)(eco_format!("{}", v)), Self::Str(v) => item!(text)(v.into()), Self::Symbol(v) => item!(text)(v.get().into()), Self::Content(v) => v, @@ -402,7 +402,7 @@ macro_rules! primitive { match value { Value::$variant(v) => Ok(v), $(Value::$other$(($binding))? => Ok($out),)* - v => Err(format_eco!( + v => Err(eco_format!( "expected {}, found {}", Self::TYPE_NAME, v.type_name(), |
