diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs index 0928cf30..c9678b9d 100644 --- a/examples/tour/src/main.rs +++ b/examples/tour/src/main.rs @@ -528,10 +528,9 @@ impl<'a> Step { .push(Language::all().iter().cloned().fold( Column::new().padding(10).spacing(20), |choices, language| { - let label: &str = language.into(); choices.push(Radio::new( language, - label, + language, selection, StepMessage::LanguageSelected, )) @@ -730,16 +729,16 @@ impl Language { } } -impl From for &str { - fn from(language: Language) -> &'static str { - match language { +impl From for String { + fn from(language: Language) -> String { + String::from(match language { Language::Rust => "Rust", Language::Elm => "Elm", Language::Ruby => "Ruby", Language::Haskell => "Haskell", Language::C => "C", Language::Other => "Other", - } + }) } }