diff --git a/lib/core/libimagerror/src/str.rs b/lib/core/libimagerror/src/str.rs index 66105d61..745a1f4b 100644 --- a/lib/core/libimagerror/src/str.rs +++ b/lib/core/libimagerror/src/str.rs @@ -25,7 +25,7 @@ pub trait ErrFromStr { impl ErrFromStr for Result { fn err_from_str(self) -> Result { - self.map_err(|e| format!("{}", e.description())) + self.map_err(|e| e.description().to_string()) } } diff --git a/lib/etc/libimagutil/src/key_value_split.rs b/lib/etc/libimagutil/src/key_value_split.rs index b1427dc1..ce9989ab 100644 --- a/lib/etc/libimagutil/src/key_value_split.rs +++ b/lib/etc/libimagutil/src/key_value_split.rs @@ -33,7 +33,7 @@ pub struct KeyValue { impl KeyValue { pub fn new(k: K, v: V) -> KeyValue { - KeyValue { k: k, v: v } + KeyValue { k, v } } pub fn key(&self) -> &K {