diff --git a/plugins/autostart/README.md b/plugins/autostart/README.md index 76d68f73..bae2802a 100644 --- a/plugins/autostart/README.md +++ b/plugins/autostart/README.md @@ -57,11 +57,9 @@ First you need to register the core plugin with Tauri: `src-tauri/src/lib.rs` ```rust -use tauri_plugin_autostart::MacosLauncher; - fn main() { tauri::Builder::default() - .plugin(tauri_plugin_autostart::init(MacosLauncher::LaunchAgent, Some(vec!["--flag1", "--flag2"]) /* arbitrary number of args to pass to your app */)) + .plugin(tauri_plugin_autostart::Builder::new().args((["--flag1", "--flag2"])).build())) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/plugins/autostart/src/lib.rs b/plugins/autostart/src/lib.rs index 70314860..07ed5119 100644 --- a/plugins/autostart/src/lib.rs +++ b/plugins/autostart/src/lib.rs @@ -119,8 +119,7 @@ impl Builder { /// Builder::new() /// .arg("--from-autostart") /// .arg("--hey") - /// .build() - /// .unwrap(); + /// .build(); /// ``` pub fn arg>(mut self, arg: S) -> Self { self.args.push(arg.into()); @@ -134,8 +133,7 @@ impl Builder { /// ```no_run /// Builder::new() /// .args(["--from-autostart", "--hey"]) - /// .build() - /// .unwrap(); + /// .build(); /// ``` pub fn args(mut self, args: I) -> Self where