mirror of https://github.com/Aloxaf/silicon
parent
67914eced0
commit
49d7bb77c9
|
@ -933,8 +933,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "pathfinder_simd"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b451513912d6b3440e443aa75a73ab22203afedc4a90df8526d008c0f86f7cb3"
|
||||
source = "git+https://github.com/servo/pathfinder#20adbeed149713ae4354cede3a30ca0f622c9943"
|
||||
dependencies = [
|
||||
"rustc_version",
|
||||
]
|
||||
|
|
|
@ -54,6 +54,9 @@ default-features = false
|
|||
features = ["termcolor", "atty", "humantime"]
|
||||
optional = true
|
||||
|
||||
[patch.crates-io]
|
||||
pathfinder_simd = { version = "0.5.0", git = "https://github.com/servo/pathfinder" }
|
||||
|
||||
[features]
|
||||
# fearures required for silicon as a application
|
||||
# disable it when using as a library
|
||||
|
|
|
@ -38,7 +38,7 @@ pub fn dump_image_to_clipboard(image: &DynamicImage) -> Result<(), Error> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(all(target_os = "macos", not(target_arch = "aarch64")))]
|
||||
pub fn dump_image_to_clipboard(image: &DynamicImage) -> Result<(), Error> {
|
||||
let mut temp = tempfile::NamedTempFile::new()?;
|
||||
image.write_to(&mut temp, ImageOutputFormat::Png)?;
|
||||
|
@ -67,7 +67,7 @@ pub fn dump_image_to_clipboard(image: &DynamicImage) -> Result<(), Error> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows")))]
|
||||
#[cfg(not(any(target_os = "linux", all(target_os = "macos", not(target_arch = "aarch64")), target_os = "windows")))]
|
||||
pub fn dump_image_to_clipboard(_image: &DynamicImage) -> Result<(), Error> {
|
||||
Err(format_err!(
|
||||
"This feature hasn't been implemented for your system"
|
||||
|
|
Loading…
Reference in New Issue