Skip to content

Commit

Permalink
drop the clone
Browse files Browse the repository at this point in the history
  • Loading branch information
knzai committed Jul 21, 2024
1 parent a51196e commit 1db7edb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/file_upload/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ impl Component for App {
fn update(&mut self, ctx: &Context<Self>, msg: Self::Message) -> bool {
match msg {
Msg::Loaded(file) => {
let name = file.name.clone();
self.readers.remove(&file.name);
self.files.push(file);
self.readers.remove(&name);
true
}
Msg::Files(files) => {
Expand Down

0 comments on commit 1db7edb

Please sign in to comment.