(&mut self)
| 54 | #[allow(unsafe_code)] |
| 55 | impl Drop for EnvVarGuard { |
| 56 | fn drop(&mut self) { |
| 57 | for var in &self.vars { |
| 58 | if let Some(value) = &var.original { |
| 59 | unsafe { |
| 60 | std::env::set_var(var.key, value); |
| 61 | } |
| 62 | } else { |
| 63 | unsafe { |
| 64 | std::env::remove_var(var.key); |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | // _lock drops here, releasing the mutex |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | // ── TLS helpers ────────────────────────────────────────────────────────────── |
nothing calls this directly
no outgoing calls
no test coverage detected