apollo_infra_utils 0.18.0-dev.0

Infrastructure utility.
Documentation
1
2
3
4
5
6
use ::url::Url;

pub fn to_safe_string(url: &Url) -> String {
    // We print only the hostnames to avoid leaking the API keys.
    url.host().map_or_else(|| "no host in url!".to_string(), |host| host.to_string())
}