aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/util.rs
blob: 0c2c5da4ff6a18bc8bcc4750e7d50e2baba539dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! This module contains various utility/helper functions that do not fit into any other module

/// This function's only use is to force a `panic!()`
// This must NOT be async to ensure crashing whole application.
#[tauri::command]
pub fn force_panic() {
    panic!("Force panicked!");
}

/// Returns true if built in debug mode
#[tauri::command]
pub async fn is_debug_mode() -> bool {
    cfg!(debug_assertions)
}