1
2
3
4
5
6
7
8
9
10
11
12
13
#![allow(clippy::module_name_repetitions)]

use tauri::{AppHandle, Manager, Wry};

#[tauri::command]
#[allow(clippy::needless_pass_by_value)]
pub fn maximize_window(app_handle: AppHandle<Wry>) -> Result<(), String> {
  app_handle
    .get_window("main")
    .unwrap()
    .maximize()
    .map_err(|e| format!("error: {}", e))
}