INNER CODE UNIT · Rust
feature_enabled
ogham/dog · build.rs:129
fn feature_enabled(name: &str) -> bool {
env::var(&format!("CARGO_FEATURE_{}", name))
.map(|e| ! e.is_empty())
.unwrap_or(false)
}
/// A comma-separated list of non-standard feature choices.
fn nonstandard_features_string() -> String {
let mut s = Vec::new();
if ! feature_enabled("WITH_IDNA") {
s.push("-idna");
}
if ! feature_enabled("WITH_TLS") {
s.push("-tls");
}