MCPcopy Index your code
hub / github.com/assert-rs/assert_cmd / target_dir

Function target_dir

src/cargo.rs:286–293  ·  view source on GitHub ↗

Adapted from https://github.com/rust-lang/cargo/blob/485670b3983b52289a2f353d589c57fae2f60f82/tests/testsuite/support/mod.rs#L507

()

Source from the content-addressed store, hash-verified

284// Adapted from
285// https://github.com/rust-lang/cargo/blob/485670b3983b52289a2f353d589c57fae2f60f82/tests/testsuite/support/mod.rs#L507
286fn target_dir() -> Option<path::PathBuf> {
287 let mut path = env::current_exe().ok()?;
288 let _test_bin_name = path.pop();
289 if path.ends_with("deps") {
290 let _deps = path.pop();
291 }
292 Some(path)
293}
294
295/// The current process' target triplet.
296const CURRENT_TARGET: &str = include_str!(concat!(env!("OUT_DIR"), "/current_target.txt"));

Callers 1

legacy_cargo_binFunction · 0.85

Calls 1

okMethod · 0.45

Tested by

no test coverage detected