(&mut self)
| 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] |
nothing calls this directly
no outgoing calls
no test coverage detected