mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 23:37:32 +00:00
imp(Deps): doesnt compile ansi_term on Windows since its not used
Before this commit, ansi_term was compiled anytime the `color` feature was used. However, on Windows the `color` feature is ignored. Even so ansi_term was compiled, and just not used. This commit fixes that by only compiling ansi_term on non-Windows targets. Thanks to @retep998 for the gudiance. Closes #1155
This commit is contained in:
parent
cdfdbfffb5
commit
6971624428
2 changed files with 4 additions and 2 deletions
|
@ -53,13 +53,15 @@ unicode-width = "0.1.4"
|
||||||
textwrap = "0.9.0"
|
textwrap = "0.9.0"
|
||||||
ordermap = "0.3.5"
|
ordermap = "0.3.5"
|
||||||
strsim = { version = "0.7.0", optional = true }
|
strsim = { version = "0.7.0", optional = true }
|
||||||
ansi_term = { version = "0.10.0", optional = true }
|
|
||||||
yaml-rust = { version = "0.3.5", optional = true }
|
yaml-rust = { version = "0.3.5", optional = true }
|
||||||
clippy = { version = "~0.0.166", optional = true }
|
clippy = { version = "~0.0.166", optional = true }
|
||||||
atty = { version = "0.2.2", optional = true }
|
atty = { version = "0.2.2", optional = true }
|
||||||
vec_map = { version = "0.8", optional = true }
|
vec_map = { version = "0.8", optional = true }
|
||||||
term_size = { version = "0.3.0", optional = true }
|
term_size = { version = "0.3.0", optional = true }
|
||||||
|
|
||||||
|
[target.'cfg(not(windows))'.dependencies]
|
||||||
|
ansi_term = { version = "0.10.0", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
regex = "0.2"
|
regex = "0.2"
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
|
|
|
@ -530,7 +530,7 @@
|
||||||
#![cfg_attr(feature = "lints", allow(doc_markdown))]
|
#![cfg_attr(feature = "lints", allow(doc_markdown))]
|
||||||
#![cfg_attr(feature = "lints", allow(explicit_iter_loop))]
|
#![cfg_attr(feature = "lints", allow(explicit_iter_loop))]
|
||||||
|
|
||||||
#[cfg(feature = "color")]
|
#[cfg(all(feature = "color", not(target_os = "windows")))]
|
||||||
extern crate ansi_term;
|
extern crate ansi_term;
|
||||||
#[cfg(feature = "color")]
|
#[cfg(feature = "color")]
|
||||||
extern crate atty;
|
extern crate atty;
|
||||||
|
|
Loading…
Add table
Reference in a new issue