Skip to content

Commit d75713a

Browse files
authored
chore(deps): update to wry 0.37 (#8936)
1 parent af64652 commit d75713a

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

.changes/wry-0.37.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-runtime-wry": patch:deps
3+
---
4+
5+
Upgraded to `wry@0.37.0`

Cargo.lock

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/tauri-runtime-wry/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ edition = { workspace = true }
1313
rust-version = { workspace = true }
1414

1515
[dependencies]
16-
wry = { version = "0.36", default-features = false, features = [ "file-drop", "protocol", "os-webview" ] }
16+
wry = { version = "0.37", default-features = false, features = [ "file-drop", "protocol", "os-webview" ] }
1717
tao = { version = "0.26", default-features = false, features = [ "rwh_06" ] }
1818
tauri-runtime = { version = "2.0.0-beta.3", path = "../tauri-runtime" }
1919
tauri-utils = { version = "2.0.0-beta.3", path = "../tauri-utils" }
2020
raw-window-handle = "0.6"
2121
http = "0.2"
22+
url = "2"
2223
tracing = { version = "0.1", optional = true }
2324

2425
[target."cfg(windows)".dependencies]

core/tauri-runtime-wry/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ use tao::{
6060
#[cfg(target_os = "macos")]
6161
use tauri_utils::TitleBarStyle;
6262
use tauri_utils::{config::WindowConfig, debug_eprintln, Theme};
63+
use url::Url;
6364
use wry::{
64-
FileDropEvent as WryFileDropEvent, ProxyConfig, ProxyEndpoint, Url, WebContext, WebView,
65+
FileDropEvent as WryFileDropEvent, ProxyConfig, ProxyEndpoint, WebContext, WebView,
6566
WebViewBuilder,
6667
};
6768

@@ -2822,7 +2823,7 @@ fn handle_user_message<T: UserEvent>(
28222823

28232824
// Getters
28242825
WebviewMessage::Url(tx) => {
2825-
tx.send(webview.url()).unwrap();
2826+
tx.send(webview.url().parse().unwrap()).unwrap();
28262827
}
28272828
WebviewMessage::Position(tx) => {
28282829
let bounds = webview.bounds();
@@ -3459,7 +3460,6 @@ fn create_webview<T: UserEvent>(
34593460
let mut webview_builder = builder
34603461
.with_focused(window.is_focused())
34613462
.with_url(&url)
3462-
.unwrap() // safe to unwrap because we validate the URL beforehand
34633463
.with_transparent(webview_attributes.transparent)
34643464
.with_accept_first_mouse(webview_attributes.accept_first_mouse);
34653465

0 commit comments

Comments
 (0)