mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
refactor: simplify event handling in CoreManager by removing unnecessary match statement
This commit is contained in:
@@ -472,8 +472,7 @@ impl CoreManager {
|
|||||||
|
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
while let Some(event) = rx.recv().await {
|
while let Some(event) = rx.recv().await {
|
||||||
match event {
|
if let tauri_plugin_shell::process::CommandEvent::Stdout(line) = event {
|
||||||
tauri_plugin_shell::process::CommandEvent::Stdout(line) => {
|
|
||||||
if let Err(e) = writeln!(log_file, "{}", String::from_utf8_lossy(&line)) {
|
if let Err(e) = writeln!(log_file, "{}", String::from_utf8_lossy(&line)) {
|
||||||
logging!(
|
logging!(
|
||||||
error,
|
error,
|
||||||
@@ -484,8 +483,6 @@ impl CoreManager {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user