fn config_dir_impl(xi_var: Option<&str>, xdg_var: Option<&str>) -> PathBuf {
    xi_var.map(PathBuf::from)
        .unwrap_or_else(|| {
            let mut xdg_config = xdg_var.map(PathBuf::from)
                .unwrap_or_else(|| {
                    env::var("HOME").map(PathBuf::from)
                        .map(|mut p| {
                            p.push(".config");
                            p
                        })
                        .expect("$HOME is required by POSIX")
                });
            xdg_config.push("xi");
            xdg_config
        })
}
/// Returns the location of the active config directory.
///
/// env vars are passed in as Option<&str> for easier testing.
Returns the location of the active config directory.
env vars are passed in as Option<&str> for easier testing.
Returns the location of the active config directory . env vars are passed in as Option<&str > for easier testing .
fn config_dir_impl(xi_var: Option<&str>, xdg_var: Option<&str>) -> PathBuf {
    xi_var.map(PathBuf::from)
        .unwrap_or_else(|| {
            let mut xdg_config = xdg_var.map(PathBuf::from)
                .unwrap_or_else(|| {
                    env::var("HOME").map(PathBuf::from)
                        .map(|mut p| {
                            p.push(".config");
                            p
                        })
                        .expect("$HOME is required by POSIX")
                });
            xdg_config.push("xi");
            xdg_config
        })
}
fn config_dir_impl ( xi_var : Option < & str > , xdg_var : Option < & str > ) -> PathBuf { xi_var . map ( PathBuf :: from ) . unwrap_or_else ( | | { let mut xdg_config = xdg_var . map ( PathBuf :: from ) . unwrap_or_else ( | | { env :: var ( " " ) . map ( PathBuf :: from ) . map ( | mut p | { p . push ( " " ) ; p } ) . expect ( " " ) } ) ; xdg_config . push ( " " ) ; xdg_config } ) }
Returns the location of the active config directory.
Returns the location of the active config directory .
xi_var
Option<&str>
xdg_var
Option<&str>