From 671e16b5f3794d9b6dba55d079fc39bbe8a34589 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Tue, 3 Oct 2023 18:16:42 +0200 Subject: [PATCH] i18n: fix clippy warnings --- crates/i18n-scan/src/key.rs | 2 +- crates/i18n/src/translations.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 {