Skip to content

Commit

Permalink
🔧 update rust code
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Jan 7, 2025
1 parent 3edb137 commit 22cacfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src-tauri/src/app/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ pub fn set_global_shortcut(app: &AppHandle, shortcut: String) -> tauri::Result<(
let last_triggered = Arc::clone(&last_triggered);
move |app, event, _shortcut| {
let mut last_triggered = last_triggered.lock().unwrap();
if Instant::now().duration_since(*last_triggered) < Duration::from_millis(300) {
if Instant::now().duration_since(*last_triggered)
< Duration::from_millis(300)
{
return;
}
*last_triggered = Instant::now();
Expand Down

0 comments on commit 22cacfa

Please sign in to comment.