use String::clone in todo example
This commit is contained in:
parent
b9398d2df8
commit
786ac31c02
1 changed files with 1 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ impl Application for Todos {
|
|||
Message::CreateTask => {
|
||||
if !self.input_value.is_empty() {
|
||||
self.tasks.push(Task::new(self.input_value.clone()));
|
||||
self.input_value = String::new();
|
||||
self.input_value.clear();
|
||||
}
|
||||
}
|
||||
Message::TaskChanged(i, completed) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue