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

Method isolated

libatomic/tests/local_sync_test.rs:27–41  ·  view source on GitHub ↗
(config: &Path)

Source from the content-addressed store, hash-verified

25
26impl Environment {
27 fn isolated(config: &Path) -> Self {
28 let names = [
29 "ATOMIC_CONFIG_DIR",
30 "ATOMIC_AGENT_IDENTITY",
31 "ATOMIC_DELEGATION",
32 ];
33 let saved = names
34 .iter()
35 .map(|name| (*name, std::env::var_os(name)))
36 .collect();
37 std::env::set_var("ATOMIC_CONFIG_DIR", config);
38 std::env::remove_var("ATOMIC_AGENT_IDENTITY");
39 std::env::remove_var("ATOMIC_DELEGATION");
40 Self(saved)
41 }
42}
43
44impl Drop for Environment {

Callers

nothing calls this directly

Calls 2

collectMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected