remove rc around webview and add type for desktopcontext

This commit is contained in:
Andrew Collins committed 2023-04-11 16:45:00 -04:00
1 parent 64575eaee2
commit d6b9d8f5b6
4 files changed
+30 -29

No files matched your search

+2 -4
View File
@@ -1,5 +1,3 @@
use std::rc::Rc;
use crate::desktop_context::EventData;
use crate::protocol;
use crate::{desktop_context::UserWindowEvent, Config};
@@ -13,7 +11,7 @@ pub fn build(
cfg: &mut Config,
event_loop: &EventLoopWindowTarget<UserWindowEvent>,
proxy: EventLoopProxy<UserWindowEvent>,
) -> Rc<WebView> {
) -> WebView {
let builder = cfg.window.clone();
let window = builder.build(event_loop).unwrap();
let file_handler = cfg.file_drop_handler.take();
@@ -82,5 +80,5 @@ pub fn build(
webview = webview.with_devtools(true);
}
Rc::new(webview.build().unwrap())
webview.build().unwrap()
}