mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
feat: Custom stack size
If a user reports a crash from stacksize - we can try different stack memory sizes to try and figure out the cause. Do not try and initialise rayon on 32 bit builds Fix rayon initialisation, may not have been called before due to badly formed closure
This commit is contained in:
@@ -26,6 +26,7 @@ pub struct Config {
|
||||
pub disable_progress: Option<bool>,
|
||||
pub depth: Option<usize>,
|
||||
pub bars_on_right: Option<bool>,
|
||||
pub stack_size: Option<usize>,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
@@ -95,6 +96,14 @@ impl Config {
|
||||
pub fn get_bars_on_right(&self, options: &ArgMatches) -> bool {
|
||||
Some(true) == self.bars_on_right || options.get_flag("bars_on_right")
|
||||
}
|
||||
pub fn get_custom_stack_size(&self, options: &ArgMatches) -> Option<usize> {
|
||||
let from_cmd_line = options.get_one::<usize>("stack_size");
|
||||
if from_cmd_line.is_none() {
|
||||
self.stack_size
|
||||
} else {
|
||||
from_cmd_line.copied()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn convert_min_size(input: &str, iso: bool) -> Option<usize> {
|
||||
|
||||
Reference in New Issue
Block a user