From e15a8af8434805da9716f3f840daa4e87b18b0a2 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 13 Jan 2022 13:51:45 -0300 Subject: [PATCH] refactor(core): return `Window` on `create_window` API (#3211) --- .changes/create-window-return-window.md | 5 +++++ core/tauri/src/app.rs | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changes/create-window-return-window.md diff --git a/.changes/create-window-return-window.md b/.changes/create-window-return-window.md new file mode 100644 index 000000000..2f0ba66f6 --- /dev/null +++ b/.changes/create-window-return-window.md @@ -0,0 +1,5 @@ +--- +"tauri": minor +--- + +**Breaking change:** Return `Window` on `App` and `AppHandle`'s `create_window` function. diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 8d4bfac15..b40fb54a9 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -372,7 +372,7 @@ macro_rules! shared_app_impl { label: impl Into, url: WindowUrl, setup: F, - ) -> crate::Result<()> + ) -> crate::Result> where F: FnOnce( ::WindowBuilder, @@ -390,8 +390,7 @@ macro_rules! shared_app_impl { window_builder, webview_attributes, label, - ))?; - Ok(()) + )) } #[cfg(feature = "system-tray")]