mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-15 05:31:42 +03:00
chore(codegen): remove dead code on macOS (#3630)
This commit is contained in:
parent
9c65abce1b
commit
06ab85b469
@ -30,7 +30,7 @@ uuid = { version = "0.8", features = [ "v4" ] }
|
||||
[target."cfg(windows)".dependencies]
|
||||
ico = "0.1"
|
||||
|
||||
[target."cfg(not(windows))".dependencies]
|
||||
[target."cfg(target_os = \"linux\")".dependencies]
|
||||
png = "0.16"
|
||||
|
||||
[features]
|
||||
|
@ -360,7 +360,7 @@ fn ico_icon<P: AsRef<Path>>(root: &TokenStream, path: P) -> TokenStream {
|
||||
quote!(Some(#root::Icon::Rgba { rgba: vec![#(#rgba_items),*], width: #width, height: #height }))
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn png_icon<P: AsRef<Path>>(root: &TokenStream, path: P) -> TokenStream {
|
||||
let path = path.as_ref();
|
||||
let bytes = std::fs::read(&path)
|
||||
@ -380,6 +380,7 @@ fn png_icon<P: AsRef<Path>>(root: &TokenStream, path: P) -> TokenStream {
|
||||
quote!(Some(#root::Icon::Rgba { rgba: vec![#(#rgba_items),*], width: #width, height: #height }))
|
||||
}
|
||||
|
||||
#[cfg(any(windows, target_os = "linux"))]
|
||||
fn find_icon<F: Fn(&&String) -> bool>(
|
||||
config: &Config,
|
||||
config_parent: &Path,
|
||||
|
@ -126,6 +126,7 @@ fn set_csp<R: Runtime>(
|
||||
default_src.push(format_real_schema(schema));
|
||||
}
|
||||
|
||||
#[allow(clippy::let_and_return)]
|
||||
let csp = Csp::DirectiveMap(csp).to_string();
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user