Skip to content

Commit

Permalink
make the config's fn contextualize_config public
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Apr 18, 2023
1 parent 0b2628c commit 8f50264
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions proptest/src/test_runner/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ const RNG_ALGORITHM: &str = "PROPTEST_RNG_ALGORITHM";
const DISABLE_FAILURE_PERSISTENCE: &str =
"PROPTEST_DISABLE_FAILURE_PERSISTENCE";

/// Override the config fields from environment variables, if any are set.
/// Without the `std` feature this function returns config unchanged.
#[cfg(feature = "std")]
fn contextualize_config(mut result: Config) -> Config {
pub fn contextualize_config(mut result: Config) -> Config {
fn parse_or_warn<T: FromStr + fmt::Display>(
src: &OsString,
dst: &mut T,
Expand Down Expand Up @@ -141,8 +143,9 @@ fn contextualize_config(mut result: Config) -> Config {
result
}

/// Without the `std` feature this function returns config unchanged.
#[cfg(not(feature = "std"))]
fn contextualize_config(result: Config) -> Config {
pub fn contextualize_config(result: Config) -> Config {
result
}

Expand Down

0 comments on commit 8f50264

Please sign in to comment.