From e0d24104a3c66a9a597288032212f7ae1cc06e9a Mon Sep 17 00:00:00 2001 From: Gregory Conrad Date: Sat, 26 Nov 2022 13:33:19 -0500 Subject: [PATCH] refactor: Rewrite another method chain to be more readable --- milli/src/update/settings.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/milli/src/update/settings.rs b/milli/src/update/settings.rs index 7d281262a..fc7e6bc03 100644 --- a/milli/src/update/settings.rs +++ b/milli/src/update/settings.rs @@ -478,13 +478,8 @@ impl<'a, 't, 'u, 'i> Settings<'a, 't, 'u, 'i> { fn update_exact_attributes(&mut self) -> Result { match self.exact_attributes { Setting::Set(ref attrs) => { - let old_attrs = self - .index - .exact_attributes(self.wtxn)? - .iter() - .cloned() - .map(String::from) - .collect::>(); + let old_attrs = self.index.exact_attributes(self.wtxn)?; + let old_attrs = old_attrs.into_iter().map(String::from).collect::>(); if attrs != &old_attrs { let attrs = attrs.iter().map(String::as_str).collect::>();