From ab718bf491cc3deb427031df8dc71274fbb71cc7 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Tue, 8 Oct 2019 10:44:17 +0200 Subject: [PATCH] Opt: Skip an object allocation --- src/database/db_core.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/database/db_core.rs b/src/database/db_core.rs index a7235af..8818767 100644 --- a/src/database/db_core.rs +++ b/src/database/db_core.rs @@ -28,10 +28,10 @@ impl Properties { } } - pub fn type_name(&self) -> String { + pub fn type_name(&self) -> &str { match self { - Properties::Feature(_) => "Feature".into(), - Properties::Unknown(_, type_name) => type_name.into(), + Properties::Feature(_) => "Feature", + Properties::Unknown(_, type_name) => type_name, } }