fn count_homebrew(home: &Path) -> Option<usize> {
        let mut base = home.join(".linuxbrew");
        if !base.is_dir() {
            base = PathBuf::from("/home/linuxbrew/.linuxbrew");
        }

        match read_dir(base.join("Cellar")) {
            // subtract 1 as ${base}/Cellar contains a ".keepme" file
            Ok(dir) => Some(dir.count() - 1),
            Err(_) => None,
        }
    }
/// Returns the number of installed packages for systems
/// that have `homebrew` installed.
Returns the number of installed packages for systems
that have `homebrew` installed.
Returns the number of installed packages for systems that have ` homebrew ` installed .
fn count_homebrew(home: &Path) -> Option<usize> {
        let mut base = home.join(".linuxbrew");
        if !base.is_dir() {
            base = PathBuf::from("/home/linuxbrew/.linuxbrew");
        }
        match read_dir(base.join("Cellar")) {
            // subtract 1 as ${base}/Cellar contains a ".keepme" file
            Ok(dir) => Some(dir.count() - 1),
            Err(_) => None,
        }
    }
fn count_homebrew ( home : & Path ) -> Option < usize > { let mut base = home . join ( " " ) ; if ! base . is_dir ( ) { base = PathBuf :: from ( " " ) ; } match read_dir ( base . join ( " " ) ) { // subtract 1 as ${base}/Cellar contains a ".keepme" file Ok ( dir ) => Some ( dir . count ( ) - 1 ) , Err ( _ ) => None , } }
Returns the number of installed packages for systems
that have `homebrew` installed.
Returns the number of installed packages for systems that have ` homebrew ` installed .
home
&Path
home
&Path