From 1db7edb35a8f0f3dd15ed2e74dfe9863e499e456 Mon Sep 17 00:00:00 2001 From: Kenzi Connor Date: Sun, 21 Jul 2024 11:11:43 -0700 Subject: [PATCH] drop the clone --- examples/file_upload/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) => {