Opt: Skip an object allocation

This commit is contained in:
2019-10-08 10:44:17 +02:00
parent e4a1959fc7
commit ab718bf491

View File

@@ -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,
}
}