chore(codegen): remove dead code on macOS (#3630)

This commit is contained in:
Lucas Fernandes Nogueira 2022-03-07 10:53:02 -03:00 committed by GitHub
parent 9c65abce1b
commit 06ab85b469
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -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]

View File

@ -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,

View File

@ -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")]
{