(&mut self)
| 958 | #[allow(unsafe_code)] // Tests serialize process-wide environment changes with ENV_LOCK. |
| 959 | impl Drop for EnvVarGuard { |
| 960 | fn drop(&mut self) { |
| 961 | unsafe { |
| 962 | match &self.previous { |
| 963 | Some(value) => std::env::set_var(self.key, value), |
| 964 | None => std::env::remove_var(self.key), |
| 965 | } |
| 966 | } |
| 967 | } |
| 968 | } |
| 969 | |
| 970 | #[test] |
nothing calls this directly
no outgoing calls
no test coverage detected