From fbba2d01c9984b1f133d83c6c02ad5c099fd5794 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Tue, 22 Dec 2020 10:20:41 +0100 Subject: [PATCH] fix cargo toml dep --- Cargo.toml | 2 +- src/clipboard.rs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8c4370a2db..b84c437718 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ anyhow = "1.0.36" unicode-width = "0.1" textwrap = "0.13" -[target.'cfg(target_os = "linux")'.dependencies] +[target.'cfg(all(target_family="unix",not(target_os="macos")))'.dependencies] which = "4.0" # pprof is not available on windows diff --git a/src/clipboard.rs b/src/clipboard.rs index 1b97988d3c..48cbc5d164 100644 --- a/src/clipboard.rs +++ b/src/clipboard.rs @@ -30,8 +30,7 @@ fn execute_copy_command(command: Command, text: &str) -> Result<()> { Ok(()) } -#[cfg(target_family = "unix")] -#[cfg(not(target_os = "macos"))] +#[cfg(all(target_family = "unix", not(target_os = "macos")))] fn gen_command( path: impl AsRef, xclip_syntax: bool, @@ -46,8 +45,7 @@ fn gen_command( c } -#[cfg(target_family = "unix")] -#[cfg(not(target_os = "macos"))] +#[cfg(all(target_family = "unix", not(target_os = "macos")))] pub fn copy_string(string: &str) -> Result<()> { use std::path::PathBuf; use which::which;