mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-25 10:51:26 +01:00
Reformat project
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use tauri::{command, Runtime, Window};
|
||||
use tauri::{Runtime, Window, command};
|
||||
|
||||
#[command]
|
||||
pub(crate) fn set_title<R: Runtime>(window: Window<R>, title: &str) {
|
||||
|
||||
@@ -27,9 +27,7 @@ pub(crate) struct PluginState {
|
||||
pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
||||
let mut builder = plugin::Builder::new("yaak-mac-window")
|
||||
.setup(move |app, _| {
|
||||
app.manage(PluginState {
|
||||
native_titlebar: AtomicBool::new(false),
|
||||
});
|
||||
app.manage(PluginState { native_titlebar: AtomicBool::new(false) });
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(generate_handler![set_title, set_theme]);
|
||||
|
||||
@@ -371,9 +371,7 @@ pub fn setup_traffic_light_positioner<R: Runtime>(window: &Window<R>) {
|
||||
// Are we de-allocing this properly? (I miss safe Rust :( )
|
||||
let window_label = window.label().to_string();
|
||||
|
||||
let app_state = WindowState {
|
||||
window: window.clone(),
|
||||
};
|
||||
let app_state = WindowState { window: window.clone() };
|
||||
let app_box = Box::into_raw(Box::new(app_state)) as *mut c_void;
|
||||
let random_str: String =
|
||||
rand::rng().sample_iter(&Alphanumeric).take(20).map(char::from).collect();
|
||||
|
||||
Reference in New Issue
Block a user