pub fn theme_search_paths() -> Vec<PathBuf> {
    let mut res: Vec<PathBuf> = Vec::new();

    res.push([var("HOME").unwrap(), String::from(".icons")].iter().collect());

    for i in var("XDG_DATA_DIRS").unwrap_or_else(|_| "/usr/local/share/:/usr/share/".to_string()).split(':') {
        res.push([i, "icons"].iter().collect());
    }

    res.push(PathBuf::from("/usr/share/pixmaps"));

    res
}
/// This function returns the list of paths where the themes have to
/// be searched, according to the XDG Icon Theme specification.
///
/// # Panics
///
/// If the $HOME environment variable is not set,
/// or if its value contains the NUL character
This function returns the list of paths where the themes have to
be searched, according to the XDG Icon Theme specification.
This function returns the list of paths where the themes have to be searched according to the XDG Icon Theme specification .
pub fn theme_search_paths() -> Vec<PathBuf> {
    let mut res: Vec<PathBuf> = Vec::new();
    res.push([var("HOME").unwrap(), String::from(".icons")].iter().collect());
    for i in var("XDG_DATA_DIRS").unwrap_or_else(|_| "/usr/local/share/:/usr/share/".to_string()).split(':') {
        res.push([i, "icons"].iter().collect());
    }
    res.push(PathBuf::from("/usr/share/pixmaps"));
    res
}
pub fn theme_search_paths ( ) -> Vec < PathBuf > { let mut res : Vec < PathBuf > = Vec :: new ( ) ; res . push ( [ var ( " " ) . unwrap ( ) , String :: from ( " " ) ] . iter ( ) . collect ( ) ) ; for i in var ( " " ) . unwrap_or_else ( | _ | " " . to_string ( ) ) . split ( ':' ) { res . push ( [ i , " " ] . iter ( ) . collect ( ) ) ; } res . push ( PathBuf :: from ( " " ) ) ; res }
This function returns the list of paths where the themes have to
be searched, according to the XDG Icon Theme specification.
This function returns the list of paths where the themes have to be searched according to the XDG Icon Theme specification .
panics
If the $HOME environment variable is not set,
or if its value contains the NUL character
If the $HOME environment variable is not set or if its value contains the NUL character