fn determine_dir() -> PathBuf {
    match Manifest::open(&None) {
        Ok(manifest) => {
            let package_name = manifest
                .data
                .get("package")
                .unwrap()
                .as_table()
                .unwrap()
                .get("name")
                .unwrap()
                .as_str()
                .unwrap();
            let package_name = package_name.replace("-", "_");

            Path::new("target").join("doc").join(package_name)
        }
        Err(err) => {
            debug!("Error: {}", 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 Manifest::open(&None) {
        Ok(manifest) => {
            let package_name = manifest
                .data
                .get("package")
                .unwrap()
                .as_table()
                .unwrap()
                .get("name")
                .unwrap()
                .as_str()
                .unwrap();
            let package_name = package_name.replace("-", "_");
            Path::new("target").join("doc").join(package_name)
        }
        Err(err) => {
            debug!("Error: {}", err);
            error!("Could not find a Cargo.toml.");
            ::std::process::exit(1);
        }
    }
}
fn determine_dir ( ) -> PathBuf { match Manifest :: open ( & None ) { Ok ( manifest ) => { let package_name = manifest . data . get ( " " ) . unwrap ( ) . as_table ( ) . unwrap ( ) . get ( " " ) . unwrap ( ) . as_str ( ) . unwrap ( ) ; let package_name = package_name . replace ( " " , " " ) ; Path :: new ( " " ) . join ( " " ) . join ( package_name ) } Err ( err ) => { debug ! ( " " 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 .