fn contributors() -> Result<Contributors, LoadContributorsError> {
    let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").map_err(LoadContributorsError::Var)?;

    let mut cmd = std::process::Command::new("git")
        .args(&["--no-pager", "log", "--pretty=format:%an"])
        .current_dir(manifest_dir)
        .stdout(Stdio::piped())
        .spawn()
        .map_err(LoadContributorsError::IO)?;

    let stdout = cmd.stdout.take().ok_or(LoadContributorsError::Stdout)?;

    let contributors = BufReader::new(stdout)
        .lines()
        .filter_map(|x| x.ok())
        .collect();

    Ok(contributors)
}
/// Get the names of all contributors from the git log.
///
/// The names are deduplicated.
/// This function only works if `git` is installed and
/// the program is run through `cargo`.
Get the names of all contributors from the git log.
The names are deduplicated.
This function only works if `git` is installed and
the program is run through `cargo`.
Get the names of all contributors from the git log . The names are deduplicated . This function only works if ` git ` is installed and the program is run through ` cargo ` .
fn contributors() -> Result<Contributors, LoadContributorsError> {
    let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").map_err(LoadContributorsError::Var)?;
    let mut cmd = std::process::Command::new("git")
        .args(&["--no-pager", "log", "--pretty=format:%an"])
        .current_dir(manifest_dir)
        .stdout(Stdio::piped())
        .spawn()
        .map_err(LoadContributorsError::IO)?;
    let stdout = cmd.stdout.take().ok_or(LoadContributorsError::Stdout)?;
    let contributors = BufReader::new(stdout)
        .lines()
        .filter_map(|x| x.ok())
        .collect();
    Ok(contributors)
}
fn contributors ( ) -> Result < Contributors , LoadContributorsError > { let manifest_dir = std :: env :: var ( " " ) . map_err ( LoadContributorsError :: Var ) ? ; let mut cmd = std :: process :: Command :: new ( " " ) . args ( & [ " " , " " , " " ] ) . current_dir ( manifest_dir ) . stdout ( Stdio :: piped ( ) ) . spawn ( ) . map_err ( LoadContributorsError :: IO ) ? ; let stdout = cmd . stdout . take ( ) . ok_or ( LoadContributorsError :: Stdout ) ? ; let contributors = BufReader :: new ( stdout ) . lines ( ) . filter_map ( | x | x . ok ( ) ) . collect ( ) ; Ok ( contributors ) }
Get the names of all contributors from the git log.
Get the names of all contributors from the git log .