use let-else where the match only guarded an exit
This commit is contained in:
@@ -1161,9 +1161,8 @@ const OVERLAY_TITLEBAR_LOGICAL_PX: f64 = 24.0;
|
||||
/// Remove temporary recording artifacts (segments, previews, thumbs).
|
||||
/// Called on app exit so a discarded clip doesn't linger in `temp/`.
|
||||
fn cleanup_temp_on_exit(app: &AppHandle) {
|
||||
let st = match app.try_state::<AppState>() {
|
||||
Some(s) => s,
|
||||
None => return,
|
||||
let Some(st) = app.try_state::<AppState>() else {
|
||||
return;
|
||||
};
|
||||
clear_temp_segments(&st.app_dir, false);
|
||||
}
|
||||
@@ -1196,9 +1195,8 @@ fn start_overlay_clickthrough_poll(
|
||||
}
|
||||
}
|
||||
|
||||
let overlay = match app.get_webview_window("overlay") {
|
||||
Some(w) => w,
|
||||
None => continue,
|
||||
let Some(overlay) = app.get_webview_window("overlay") else {
|
||||
continue;
|
||||
};
|
||||
if !overlay.is_visible().unwrap_or(false) {
|
||||
last_inner = None;
|
||||
|
||||
Reference in New Issue
Block a user