style: cargo fmt (#89)

This commit is contained in:
pan93412
2022-11-20 13:52:37 +08:00
parent 385c7136da
commit 64434845a9
2 changed files with 21 additions and 29 deletions

View File

@@ -18,33 +18,29 @@ use wry::{
webview::WebViewBuilder, webview::WebViewBuilder,
}; };
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
use wry::{ use wry::{
application::{ application::{
event::{Event, StartCause, WindowEvent}, event::{Event, StartCause, WindowEvent},
event_loop::{ControlFlow, EventLoop}, event_loop::{ControlFlow, EventLoop},
menu::{MenuType}, menu::MenuType,
window::{Fullscreen, Window, WindowBuilder, Icon}, window::{Fullscreen, Icon, Window, WindowBuilder},
}, },
webview::WebViewBuilder, webview::WebViewBuilder,
}; };
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
use wry::{ use wry::{
application::{ application::{
event::{Event, StartCause, WindowEvent}, event::{Event, StartCause, WindowEvent},
event_loop::{ControlFlow, EventLoop}, event_loop::{ControlFlow, EventLoop},
menu::{MenuType}, menu::MenuType,
window::{Fullscreen, Window, WindowBuilder}, window::{Fullscreen, Window, WindowBuilder},
}, },
webview::WebViewBuilder, webview::WebViewBuilder,
}; };
fn main() -> wry::Result<()> { fn main() -> wry::Result<()> {
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
let mut menu_bar_menu = Menu::new(); let mut menu_bar_menu = Menu::new();
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
@@ -126,7 +122,6 @@ fn main() -> wry::Result<()> {
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
let icon = load_icon(std::path::Path::new(icon_path)); let icon = load_icon(std::path::Path::new(icon_path));
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
let window = common_window let window = common_window
.with_decorations(true) .with_decorations(true)
@@ -136,10 +131,7 @@ fn main() -> wry::Result<()> {
.unwrap(); .unwrap();
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
let window = common_window let window = common_window.with_title("").build(&event_loop).unwrap();
.with_title("")
.build(&event_loop)
.unwrap();
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
let window = common_window let window = common_window
@@ -174,8 +166,8 @@ fn main() -> wry::Result<()> {
.with_back_forward_navigation_gestures(true) .with_back_forward_navigation_gestures(true)
.build()?; .build()?;
#[cfg(feature = "devtools")]
#[cfg(feature = "devtools")] { {
webview.open_devtools(); webview.open_devtools();
} }