Function project_root::get_project_root[][src]

pub fn get_project_root() -> Result<PathBuf, Error>

Get the project root (relative to closest Cargo.lock file)

let project_path = match project_root::get_project_root() {
    Ok(p) => p.to_str().expect("Could not retrieve project path").to_string(),
    Err(e) => panic!(e),
};