Use if instead of match

This commit is contained in:
Vladimir Borisov 2024-04-17 17:56:56 +03:00
parent 55cbb36948
commit 70c19490df
No known key found for this signature in database
GPG key ID: F9A584BE4FCB6603

View file

@ -178,8 +178,7 @@ impl PartialUi for WebView {
_handle: nwg::ControlHandle, _handle: nwg::ControlHandle,
) { ) {
use nwg::Event as E; use nwg::Event as E;
match evt { if evt == E::OnNotice {
E::OnNotice => {
let message_queue = self.message_queue.clone(); let message_queue = self.message_queue.clone();
if let Some(controller) = self.controller.get() { if let Some(controller) = self.controller.get() {
let webview = controller.get_webview().expect("Cannot get vebview"); let webview = controller.get_webview().expect("Cannot get vebview");
@ -189,7 +188,5 @@ impl PartialUi for WebView {
} }
} }
} }
_ => {}
}
} }
} }