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

Method drop

crates/openshell-server/src/cli.rs:792–799  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

790 impl Drop for EnvVarGuard {
791 #[allow(unsafe_code)]
792 fn drop(&mut self) {
793 match self.original.as_deref() {
794 // SAFETY: tests serialize environment mutation with ENV_LOCK.
795 Some(value) => unsafe { std::env::set_var(self.key, value) },
796 // SAFETY: tests serialize environment mutation with ENV_LOCK.
797 None => unsafe { std::env::remove_var(self.key) },
798 }
799 }
800 }
801
802 #[test]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected