diff options
Diffstat (limited to 'crates/directory/src/config.rs')
-rw-r--r-- | crates/directory/src/config.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/directory/src/config.rs b/crates/directory/src/config.rs index 1afda89d..efe216e6 100644 --- a/crates/directory/src/config.rs +++ b/crates/directory/src/config.rs @@ -307,7 +307,7 @@ impl InsertLine for LookupList { } } -impl InsertLine for AHashMap<String, Variable<'static>> { +impl InsertLine for AHashMap<String, Variable> { fn insert(&mut self, entry: String, format: &LookupFormat) { let (key, value) = entry .split_once(format.separator.as_deref().unwrap_or(" ")) @@ -334,17 +334,17 @@ impl InsertLine for AHashMap<String, Variable<'static>> { } let value = if has_other || !has_digit { - Variable::String(value.to_string()) + Variable::String(value.to_string().into()) } else if has_dots { value .parse() .map(Variable::Float) - .unwrap_or_else(|_| Variable::String(value.to_string())) + .unwrap_or_else(|_| Variable::String(value.to_string().into())) } else { value .parse() .map(Variable::Integer) - .unwrap_or_else(|_| Variable::String(value.to_string())) + .unwrap_or_else(|_| Variable::String(value.to_string().into())) }; self.insert(key.to_string(), value); |