From 19238425f231dfc4152c67233316d458f64eac51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Mon, 5 Sep 2022 22:43:18 +0200 Subject: [PATCH] Don't clone strings when looking up font family --- lapce-data/src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lapce-data/src/config.rs b/lapce-data/src/config.rs index 9eb30892..88ae2163 100644 --- a/lapce-data/src/config.rs +++ b/lapce-data/src/config.rs @@ -307,7 +307,7 @@ pub fn font_family(&self) -> FontFamily { if self.font_family.is_empty() { FontFamily::SYSTEM_UI } else { - FontFamily::new_unchecked(self.font_family.clone()) + FontFamily::new_unchecked(self.font_family.as_str()) } } @@ -345,7 +345,7 @@ pub fn hover_font_family(&self) -> FontFamily { if self.hover_font_family.is_empty() { self.font_family() } else { - FontFamily::new_unchecked(self.hover_font_family.clone()) + FontFamily::new_unchecked(self.hover_font_family.as_str()) } }