allow inlining (this did not provide a statistically significant performance boost - oh well)

This commit is contained in:
2020-04-28 18:00:31 +01:00
parent dd00686de0
commit f899f03dbe
15 changed files with 56 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ pub enum Font {
}
impl Font {
#[inline]
pub(crate) fn from(str: &str) -> Font {
match str {
"unicode_european_small" => Font::UnicodeEuropeanSmall,
@@ -19,6 +20,7 @@ impl Font {
}
}
#[inline]
pub(crate) fn to_string(&self) -> Result<String, &'static str> {
match &self {
Font::UnicodeEuropeanSmall => Ok("unicode_european_small".to_string()),