Skip to content

Commit

Permalink
Do not use Cell impls on LocalKey due to rustc version
Browse files Browse the repository at this point in the history
  • Loading branch information
Andlon committed Jul 5, 2024
1 parent bb3d871 commit ae2d5bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proptest/src/is_minimal_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ pub(crate) struct MinimalCaseGuard;

impl MinimalCaseGuard {
pub(crate) fn begin_minimal_case() -> Self {
IS_MINIMAL_CASE.replace(true);
IS_MINIMAL_CASE.with(|cell| cell.replace(true));
Self
}
}

impl Drop for MinimalCaseGuard {
fn drop(&mut self) {
IS_MINIMAL_CASE.replace(false);
IS_MINIMAL_CASE.with(|cell| cell.replace(false));
}
}

0 comments on commit ae2d5bf

Please sign in to comment.