fn cargo_dir() -> PathBuf {
    env::var_os("CARGO_BIN_PATH")
        .map(PathBuf::from)
        .or_else(|| {
            env::current_exe().ok().map(|mut path| {
                path.pop();
                if path.ends_with("deps") {
                    path.pop();
                }
                path
            })
        })
        .unwrap_or_else(|| panic!("CARGO_BIN_PATH wasn't set. Cannot continue running test"))
}
/// Returns the directory where the binaries are saved. This
/// was taken from the Cargo project, see
/// https://github.com/rust-lang/cargo/blob/7fa132c7272fb9faca365c1d350e8e3c4c0d45e9/tests/cargotest/support/mod.rs#L316-L333
Returns the directory where the binaries are saved.
Returns the directory where the binaries are saved .
fn cargo_dir() -> PathBuf {
    env::var_os("CARGO_BIN_PATH")
        .map(PathBuf::from)
        .or_else(|| {
            env::current_exe().ok().map(|mut path| {
                path.pop();
                if path.ends_with("deps") {
                    path.pop();
                }
                path
            })
        })
        .unwrap_or_else(|| panic!("CARGO_BIN_PATH wasn't set. Cannot continue running test"))
}
fn cargo_dir ( ) -> PathBuf { env :: var_os ( " " ) . map ( PathBuf :: from ) . or_else ( | | { env :: current_exe ( ) . ok ( ) . map ( | mut path | { path . pop ( ) ; if path . ends_with ( " " ) { path . pop ( ) ; } path } ) } ) . unwrap_or_else ( | | panic ! ( " " ) ) }
Returns the directory where the binaries are saved.
Returns the directory where the binaries are saved .