diff --git a/examples/file_upload/src/main.rs b/examples/file_upload/src/main.rs index 273dfd83acc..121ef0b671c 100644 --- a/examples/file_upload/src/main.rs +++ b/examples/file_upload/src/main.rs @@ -38,9 +38,8 @@ impl Component for App { fn update(&mut self, ctx: &Context, 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) => {