Skip to content

Commit

Permalink
fix: Update README example (#1116)
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 authored Dec 8, 2023
1 parent e116d42 commit 6525783
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()?;

Expand Down

0 comments on commit 6525783

Please sign in to comment.