diff --git a/lib/etc/libimagutil/src/key_value_split.rs b/lib/etc/libimagutil/src/key_value_split.rs index f1ad8c9d..b1427dc1 100644 --- a/lib/etc/libimagutil/src/key_value_split.rs +++ b/lib/etc/libimagutil/src/key_value_split.rs @@ -75,7 +75,12 @@ impl IntoKeyValue for String { .unwrap(); } R.captures(&self[..]) - .map(|c| c.name("VALUE").or(c.name("QVALUE")).map(|m| m.as_str()).unwrap_or("")) + .map(|c| { + c.name("VALUE") + .or_else(|| c.name("QVALUE")) + .map(|m| m.as_str()) + .unwrap_or("") + }) }; key.and_then(|k| {