refactor: cargo clippy (#90)
This commit is contained in:
@@ -91,7 +91,7 @@ fn main() -> wry::Result<()> {
|
|||||||
resizable,
|
resizable,
|
||||||
fullscreen,
|
fullscreen,
|
||||||
..
|
..
|
||||||
} = get_windows_config().unwrap_or(WindowConfig::default());
|
} = get_windows_config().unwrap_or_default();
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
let WindowConfig {
|
let WindowConfig {
|
||||||
url,
|
url,
|
||||||
@@ -100,7 +100,7 @@ fn main() -> wry::Result<()> {
|
|||||||
resizable,
|
resizable,
|
||||||
fullscreen,
|
fullscreen,
|
||||||
..
|
..
|
||||||
} = get_windows_config().unwrap_or(WindowConfig::default());
|
} = get_windows_config().unwrap_or_default();
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
let WindowConfig {
|
let WindowConfig {
|
||||||
url,
|
url,
|
||||||
@@ -110,7 +110,7 @@ fn main() -> wry::Result<()> {
|
|||||||
transparent,
|
transparent,
|
||||||
fullscreen,
|
fullscreen,
|
||||||
..
|
..
|
||||||
} = get_windows_config().unwrap_or(WindowConfig::default());
|
} = get_windows_config().unwrap_or_default();
|
||||||
let event_loop = EventLoop::new();
|
let event_loop = EventLoop::new();
|
||||||
|
|
||||||
let common_window = WindowBuilder::new()
|
let common_window = WindowBuilder::new()
|
||||||
@@ -209,7 +209,7 @@ fn get_windows_config() -> Option<WindowConfig> {
|
|||||||
let config_file = include_str!("../tauri.conf.json");
|
let config_file = include_str!("../tauri.conf.json");
|
||||||
let config: Config = serde_json::from_str(config_file).expect("failed to parse windows config");
|
let config: Config = serde_json::from_str(config_file).expect("failed to parse windows config");
|
||||||
|
|
||||||
config.tauri.windows.iter().next().cloned()
|
config.tauri.windows.first().cloned()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
|
|||||||
Reference in New Issue
Block a user