allow inlining (this did not provide a statistically significant performance boost - oh well)
This commit is contained in:
@@ -14,6 +14,7 @@ pub enum Transition {
|
||||
}
|
||||
|
||||
impl From<&str> for Transition {
|
||||
#[inline]
|
||||
fn from(str: &str) -> Transition {
|
||||
match str {
|
||||
"fade_w" => Transition::FadeToWhite,
|
||||
@@ -30,6 +31,7 @@ impl From<&str> for Transition {
|
||||
}
|
||||
|
||||
impl ToString for Transition {
|
||||
#[inline]
|
||||
fn to_string(&self) -> String {
|
||||
match &self {
|
||||
Transition::FadeToWhite => " FX fade_w",
|
||||
@@ -56,6 +58,7 @@ pub struct Exit {
|
||||
}
|
||||
|
||||
impl From<String> for Exit {
|
||||
#[inline]
|
||||
fn from(string: String) -> Exit {
|
||||
// e.g. "EXT 6,4 0 10,12 FX fade_w"
|
||||
let room_position_effect: Vec<&str> = string.split_whitespace().collect();
|
||||
@@ -77,6 +80,7 @@ impl From<String> for Exit {
|
||||
}
|
||||
|
||||
impl ToString for Exit {
|
||||
#[inline]
|
||||
fn to_string(&self) -> String {
|
||||
format!(
|
||||
"{} {}{}",
|
||||
|
||||
Reference in New Issue
Block a user