Skip to content

Commit 3806568

Browse files
Remove AsRef<Window> on WebviewWindow (#14026)
1 parent bc4afe7 commit 3806568

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

.changes/WebviewWindow-on_webview_event.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,4 @@
22
tauri: minor:enhance
33
---
44

5-
- Implemented `Webview::on_webview_event` for `WebviewWindow` as well
6-
- Implemented `AsRef<Window<R>>` for `WebviewWindow<R>`
7-
8-
This can be considered a *BREAKING CHANGE* in very specific cases:
9-
Typically, this means you are relying on implicit type inference, such as `let webview: _ = WebviewWindow.as_ref()`.
10-
To resolve this, you should explicitly specify the type, for example `let webview: &Window<R> = WebviewWindow.as_ref()`
11-
or `let webview: _ = AsRef::<Webview<R>>::as_ref(&WebviewWindow)`.
5+
Implemented `Webview::on_webview_event` for `WebviewWindow` as well

crates/tauri/src/webview/webview_window.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,12 +1365,6 @@ impl<R: Runtime> AsRef<Webview<R>> for WebviewWindow<R> {
13651365
}
13661366
}
13671367

1368-
impl<R: Runtime> AsRef<Window<R>> for WebviewWindow<R> {
1369-
fn as_ref(&self) -> &Window<R> {
1370-
&self.window
1371-
}
1372-
}
1373-
13741368
impl<R: Runtime> Clone for WebviewWindow<R> {
13751369
fn clone(&self) -> Self {
13761370
Self {

0 commit comments

Comments
 (0)