MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / drop

Method drop

crates/openshell-server/src/defaults.rs:138–145  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

136 impl Drop for EnvVarGuard {
137 #[allow(unsafe_code)]
138 fn drop(&mut self) {
139 match self.original.as_deref() {
140 // SAFETY: tests serialize environment mutation with ENV_LOCK.
141 Some(value) => unsafe { std::env::set_var(self.key, value) },
142 // SAFETY: tests serialize environment mutation with ENV_LOCK.
143 None => unsafe { std::env::remove_var(self.key) },
144 }
145 }
146 }
147
148 #[test]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected