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