mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-26 22:22:13 +08:00
refactor: simplify function return types and remove unnecessary wraps
This commit is contained in:
@@ -53,12 +53,12 @@ pub async fn get_running_mode() -> Result<Arc<RunningMode>, String> {
|
||||
|
||||
/// 获取应用的运行时间(毫秒)
|
||||
#[tauri::command]
|
||||
pub fn get_app_uptime() -> CmdResult<u128> {
|
||||
Ok(APP_START_TIME.elapsed().as_millis())
|
||||
pub fn get_app_uptime() -> u128 {
|
||||
APP_START_TIME.elapsed().as_millis()
|
||||
}
|
||||
|
||||
/// 检查应用是否以管理员身份运行
|
||||
#[tauri::command]
|
||||
pub fn is_admin() -> CmdResult<bool> {
|
||||
Ok(*APPS_RUN_AS_ADMIN)
|
||||
pub fn is_admin() -> bool {
|
||||
*APPS_RUN_AS_ADMIN
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user