diff --git a/examples/test/src/dialog.rs b/examples/test/src/dialog.rs index 364a3b9..d6a8093 100644 --- a/examples/test/src/dialog.rs +++ b/examples/test/src/dialog.rs @@ -4,7 +4,7 @@ use tauri_sys::dialog::{FileDialogBuilder, MessageDialogBuilder, MessageDialogKi pub async fn ask() -> anyhow::Result<()> { let mut builder = MessageDialogBuilder::new(); builder.set_title("Tauri"); - builder.set_type(MessageDialogKind::Warning); + builder.set_kind(MessageDialogKind::Warning); let works = builder .ask("Does this work? \n Click Yes to mark this test as passing") @@ -18,7 +18,7 @@ pub async fn ask() -> anyhow::Result<()> { pub async fn confirm() -> anyhow::Result<()> { let mut builder = MessageDialogBuilder::new(); builder.set_title("Tauri"); - builder.set_type(MessageDialogKind::Warning); + builder.set_kind(MessageDialogKind::Warning); let works = builder .confirm("Does this work? \n Click Ok to mark this test as passing") @@ -32,7 +32,7 @@ pub async fn confirm() -> anyhow::Result<()> { pub async fn message() -> anyhow::Result<()> { let mut builder = MessageDialogBuilder::new(); builder.set_title("Tauri"); - builder.set_type(MessageDialogKind::Warning); + builder.set_kind(MessageDialogKind::Warning); builder.message("This is a message just for you!").await?; diff --git a/examples/test/src/window.rs b/examples/test/src/window.rs index 68f2538..8b1614d 100644 --- a/examples/test/src/window.rs +++ b/examples/test/src/window.rs @@ -2,7 +2,7 @@ use anyhow::ensure; use tauri_sys::window; pub async fn create_window() -> anyhow::Result<()> { - let win = window::WebviewWindow::new("foo", ()); + let win = window::WebviewWindowBuilder::new("foo").build()?; ensure!(win.is_visible().await?); // ensure!(win.label() == "foo".to_string()); diff --git a/src/dialog.rs b/src/dialog.rs index b0b2560..1edc13b 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -259,7 +259,7 @@ impl<'a> MessageDialogBuilder<'a> { /// # Ok(()) /// # } /// ``` - pub fn set_kind(&mut self, r#kind: MessageDialogKind) { + pub fn set_kind(&mut self, kind: MessageDialogKind) { self.kind = r#kind; }