Commit 581957e
committed
fix: Let
Previously, an `Env` instance would restore the original state on
drop if no more than one modification was made to any one variable
through it, but would restore an intermediate state if the same
variable was ever set multiple times, unset multiple times, or both
set and unset in any order.
The state it would restore for each variable was its state
immediately before the most recent modification (through the `Env`
instance) that affected it, rather than its original state before
the first time it was modified through that `Env` instance.
This fixes that by undoing the changes in the opposite of the order
they were made.gix_testtools::Env undo multiple changes to the same var1 parent 505151c commit 581957e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
857 | 857 | | |
858 | 858 | | |
859 | 859 | | |
860 | | - | |
| 860 | + | |
861 | 861 | | |
862 | 862 | | |
863 | 863 | | |
| |||
0 commit comments