Update code snippet to new api

master
Jos van den Oever 2017-08-31 08:52:43 +02:00
parent 9c2823a1cc
commit 96295dec7c
1 changed files with 2 additions and 2 deletions

View File

@ -72,8 +72,8 @@ impl PersonTrait for Person {
&self.emit
}
/// Get the name of the Person
fn get_name(&self) -> String {
self.name.clone()
fn get_name(&self) -> &str {
&self.name
}
/// Set the name of the Person
fn set_name(&mut self, value: String) {