Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

fix: clear two windows-only clippy errors

youxi7983b3e41ab183a
diff --git a/src-tauri/src/app/window.rs b/src-tauri/src/app/window.rs
index 3eaba20e..984e2df0 100644
--- a/src-tauri/src/app/window.rs
+++ b/src-tauri/src/app/window.rs
@@ -60,7 +60,7 @@ fn prepare_macos_new_window_configuration(features: &NewWindowFeatures) -> tauri
fn build_proxy_browser_arg(url: &Url) -> Option<String> {
let host = url.host_str()?;
let scheme = url.scheme();
- let port = url.port().or_else(|| match scheme {
+ let port = url.port().or(match scheme {
"http" => Some(80),
"socks5" => Some(1080),
_ => None,
diff --git a/src-tauri/src/util.rs b/src-tauri/src/util.rs
index 12fa478b..d4222a07 100644
--- a/src-tauri/src/util.rs
+++ b/src-tauri/src/util.rs
@@ -333,6 +333,7 @@ pub enum UiLanguage {
impl UiLanguage {
/// Classifies a BCP 47 tag (`zh-Hant-TW`) or a POSIX locale (`zh_TW.UTF-8`).
+ #[cfg_attr(windows, allow(dead_code))]
pub fn from_tag(tag: &str) -> Self {
let tag = tag.to_ascii_lowercase();
let mut parts = tag.split(['-', '_', '.', '@']);