From 48cb44384dfe5cad163a91a2207cd06c45da12aa Mon Sep 17 00:00:00 2001 From: Jerry Zhong Date: Sat, 16 Dec 2023 00:18:33 +0800 Subject: [PATCH] remove .expect() after sender.send() because recievers' dropping must happen --- clashctl/src/ui/utils/tui_logger.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clashctl/src/ui/utils/tui_logger.rs b/clashctl/src/ui/utils/tui_logger.rs index 050e9dd..b41605c 100644 --- a/clashctl/src/ui/utils/tui_logger.rs +++ b/clashctl/src/ui/utils/tui_logger.rs @@ -77,8 +77,8 @@ impl log::Log for Logger { } inner .sender - .send(Event::Diagnostic(DiagnosticEvent::Log(level, content))) - .expect("All receivers dropped"); + .send(Event::Diagnostic(DiagnosticEvent::Log(level, content))).ok(); + } fn flush(&self) {}