diff options
author | Canop <cano.petrole@gmail.com> | 2021-05-06 09:47:54 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2021-05-06 09:48:21 +0200 |
commit | f339c301135fd45db8827515a1929fab81ba13af (patch) | |
tree | d8bcbc767bcec310607bb210bae0a02d3f129ebb /src/pattern | |
parent | 46bfb03383fc25d1da5d60c38746fede6cb7d324 (diff) |
fix search modes configuration removing all default mappings
Fix #383
Diffstat (limited to 'src/pattern')
-rw-r--r-- | src/pattern/search_mode.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pattern/search_mode.rs b/src/pattern/search_mode.rs index a3267fe..bc899e3 100644 --- a/src/pattern/search_mode.rs +++ b/src/pattern/search_mode.rs @@ -203,11 +203,11 @@ impl Default for SearchModeMap { impl TryFrom<&FnvHashMap<String, String>> for SearchModeMap { type Error = ConfError; fn try_from(map: &FnvHashMap<String, String>) -> Result<Self, Self::Error> { - let mut entries = Vec::with_capacity(map.len()); + let mut smm = Self::default(); for (k, v) in map { - entries.push(SearchModeMapEntry::parse(k, v)?); + smm.entries.push(SearchModeMapEntry::parse(k, v)?); } - Ok(Self { entries }) + Ok(smm) } } |