From 386b41e4827f713d1f2d3a0a2d392ee1861d638f Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Tue, 2 Aug 2022 21:15:45 -0400 Subject: [PATCH] properties_view: Ignore result of sending SVG metadata across threads `parse_svg_file_future()` is called in a cancellable async block. This means that after it's called it can be cancelled, which drops the receiver. When we fetch the metadata, we try sending the result to the dropped receiver. This is expected behavior in this case - the receiver being gone at the time of sending the metadata is perfectly valid. However, previously we would cause the thread to panic. This didn't break anything but made for scary log message. Since this is expected behavior we can use `_` to tell the compiler that we don't care about the outcome of sending. This is valid in this instance because we will only get an error if the receiver is gone. --- src/widgets/properties_view.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/properties_view.rs b/src/widgets/properties_view.rs index 551b278..e0ec37b 100644 --- a/src/widgets/properties_view.rs +++ b/src/widgets/properties_view.rs @@ -381,7 +381,7 @@ async fn parse_svg_file_future(path: std::path::PathBuf) -> anyhow::Result