Skip to content

Commit

Permalink
Exit early if shrink disabled (#520)
Browse files Browse the repository at this point in the history
Co-authored-by: grandizzy <[email protected]>
  • Loading branch information
matthew-russo and grandizzy authored Sep 23, 2024
1 parent 6962d3f commit 342adfc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions proptest/src/test_runner/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,16 @@ impl TestRunner {
fork_output: &mut ForkOutput,
is_from_persisted_seed: bool,
) -> Option<Reason> {
// exit early if shrink disabled
if self.config.max_shrink_iters == 0 {
verbose_message!(
self,
INFO_LOG,
"Shrinking disabled by configuration"
);
return None
}

#[cfg(feature = "std")]
use std::time;

Expand Down

0 comments on commit 342adfc

Please sign in to comment.