Skip to content

Commit

Permalink
Rollup merge of rust-lang#118807 - SUPERCILEX:allo, r=the8472
Browse files Browse the repository at this point in the history
Remove an allocation in min_stack
  • Loading branch information
GuillaumeGomez authored Dec 11, 2023
2 parents 551e79d + af8dfde commit 003bb06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys_common/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub fn min_stack() -> usize {
0 => {}
n => return n - 1,
}
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()));
let amt = amt.unwrap_or(imp::DEFAULT_MIN_STACK_SIZE);

// 0 is our sentinel value, so ensure that we'll never see 0 after
Expand Down

0 comments on commit 003bb06

Please sign in to comment.