From 8f502640d1d1bacf0955346a23a395825d489f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Tue, 18 Apr 2023 09:38:10 +0100 Subject: [PATCH] make the config's `fn contextualize_config` public --- proptest/src/test_runner/config.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/proptest/src/test_runner/config.rs b/proptest/src/test_runner/config.rs index 4934b1ba..04940abc 100644 --- a/proptest/src/test_runner/config.rs +++ b/proptest/src/test_runner/config.rs @@ -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( src: &OsString, dst: &mut T, @@ -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 }