allow inlining (this did not provide a statistically significant performance boost - oh well)
This commit is contained in:
@@ -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()),
|
||||
|
||||
Reference in New Issue
Block a user