MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / new

Method new

atomic-cli/src/commands/git/shim.rs:3432–3444  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3430
3431 impl TestDirectory {
3432 fn new() -> Self {
3433 let unique = SystemTime::now()
3434 .duration_since(UNIX_EPOCH)
3435 .unwrap()
3436 .as_nanos();
3437 let sequence = TEST_DIRECTORY_SEQUENCE.fetch_add(1, Ordering::Relaxed);
3438 let path = std::env::temp_dir().join(format!(
3439 "atomic-shim-collision-{}-{unique}-{sequence}",
3440 std::process::id()
3441 ));
3442 fs::create_dir(&path).unwrap();
3443 Self(path)
3444 }
3445 }
3446
3447 impl Drop for TestDirectory {

Callers

nothing calls this directly

Calls 2

temp_dirFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected