fn determine_dir() -> PathBuf {
    match metadata_run(None) {
        Ok(manifest) => {
            let package_name = manifest.workspace_members[0].name();
            let package_name = package_name.replace("-", "_");

            Path::new("target").join("doc").join(package_name)
        }
        Err(_) => {
            error!("Could not find a Cargo.toml.");
            ::std::process::exit(1);
        }
    }
}
/// Returns the directory to use as root of the documentation.
///
/// If an directory has been provided as CLI argument that one is used.
/// Otherwise we try to find the `Cargo.toml` and construct the documentation path
/// from the package name found there.
///
/// All *.html files under the root directory will be checked.
Returns the directory to use as root of the documentation.
If an directory has been provided as CLI argument that one is used.
Otherwise we try to find the `Cargo.toml` and construct the documentation path
from the package name found there.

All *.html files under the root directory will be checked.
Returns the directory to use as root of the documentation . If an directory has been provided as CLI argument that one is used . Otherwise we try to find the ` Cargo . toml ` and construct the documentation path from the package name found there . All * . html files under the root directory will be checked .
fn determine_dir() -> PathBuf {
    match metadata_run(None) {
        Ok(manifest) => {
            let package_name = manifest.workspace_members[0].name();
            let package_name = package_name.replace("-", "_");
            Path::new("target").join("doc").join(package_name)
        }
        Err(_) => {
            error!("Could not find a Cargo.toml.");
            ::std::process::exit(1);
        }
    }
}
fn determine_dir ( ) -> PathBuf { match metadata_run ( None ) { Ok ( manifest ) => { let package_name = manifest . workspace_members [ 0 ] . name ( ) ; let package_name = package_name . replace ( " " , " " ) ; Path :: new ( " " ) . join ( " " ) . join ( package_name ) } Err ( _ ) => { error ! ( " " ) ; :: std :: process :: exit ( 1 ) ; } } }
Returns the directory to use as root of the documentation.
Returns the directory to use as root of the documentation .