INNER CODE UNIT · Rust

env_value

CluvexStudio/Aether · aether/src/lib.rs:257

fn env_value(key: &str) -> Option<String> {
    std::env::var(key)
        .ok()
        .map(|value| value.trim().to_string())
        .filter(|value| !value.is_empty())
}

/// True when the endpoints were deliberately left to the scan, so there is
/// nothing left to ask about.
fn wiw_scan_requested(lookup: &dyn Fn(&str) -> Option<String>) -> bool {
    match lookup("AETHER_WIW_PEERS") {
        Some(value) => matches!(
            value.to_lowercase().as_str(),
            "auto" | "scan" | "none" | "off" | "0"
        ),
        None => false,
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…