From 652578362a56a1f2e894e614eb2cdcde5c485b64 Mon Sep 17 00:00:00 2001 From: Marc Espin Date: Fri, 8 Dec 2023 05:15:14 +0100 Subject: [PATCH] fix: Update README example (#1116) --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6fd9b59e5..d322e0cd2 100644 --- a/README.md +++ b/README.md @@ -27,19 +27,20 @@ You can use a windowing library like `tao` or `winit`. The minimum example to create a Window and browse a website looks like following: ```rust -fn main() { +fn main() -> wry::Result<()> { use tao::{ event::{Event, StartCause, WindowEvent}, event_loop::{ControlFlow, EventLoop}, window::WindowBuilder, }; - use wry::webview::WebViewBuilder; + use wry::WebViewBuilder; let event_loop = EventLoop::new(); let window = WindowBuilder::new() .with_title("Hello World") - .build(&event_loop)?; - let _webview = WebViewBuilder::new(&window)? + .build(&event_loop) + .unwrap(); + let _webview = WebViewBuilder::new(&window) .with_url("https://tauri.app")? .build()?;