diff --git a/crates/i18n-scan/src/key.rs b/crates/i18n-scan/src/key.rs index 8e4c7118e..01e39d952 100644 --- a/crates/i18n-scan/src/key.rs +++ b/crates/i18n-scan/src/key.rs @@ -87,7 +87,7 @@ impl Context { pub fn set_key_location(&self, mut key: Key, span: Span) -> Key { if let Some(file) = &self.current_file { key.location = Some(Location { - file: file.to_owned(), + file: file.clone(), span, }); } diff --git a/crates/i18n/src/translations.rs b/crates/i18n/src/translations.rs index 9b4bd0ee8..5a39835ae 100644 --- a/crates/i18n/src/translations.rs +++ b/crates/i18n/src/translations.rs @@ -287,7 +287,7 @@ impl Tree { next_key: K, mut path: I, ) -> Option<&Node> { - let next = self.inner.get(next_key.deref())?; + let next = self.inner.get(&*next_key)?; match path.next() { Some(next_key) => match &next.value {