We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 551e79d + af8dfde commit 003bb06Copy full SHA for 003bb06
library/std/src/sys_common/thread.rs
@@ -8,7 +8,7 @@ pub fn min_stack() -> usize {
8
0 => {}
9
n => return n - 1,
10
}
11
- let amt = env::var("RUST_MIN_STACK").ok().and_then(|s| s.parse().ok());
+ let amt = env::var_os("RUST_MIN_STACK").and_then(|s| s.to_str().and_then(|s| s.parse().ok()));
12
let amt = amt.unwrap_or(imp::DEFAULT_MIN_STACK_SIZE);
13
14
// 0 is our sentinel value, so ensure that we'll never see 0 after
0 commit comments