mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 137bde1099 | |||
| 0d0206a5a5 | |||
| dfce0eec66 |
Generated
+1
-1
@@ -197,7 +197,7 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "du-dust"
|
name = "du-dust"
|
||||||
version = "0.8.2"
|
version = "0.8.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
"ansi_term",
|
||||||
"assert_cmd",
|
"assert_cmd",
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "du-dust"
|
name = "du-dust"
|
||||||
description = "A more intuitive version of du"
|
description = "A more intuitive version of du"
|
||||||
version = "0.8.2"
|
version = "0.8.3"
|
||||||
authors = ["bootandy <bootandy@gmail.com>", "nebkor <code@ardent.nebcorp.com>"]
|
authors = ["bootandy <bootandy@gmail.com>", "nebkor <code@ardent.nebcorp.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
+13
-5
@@ -11,6 +11,7 @@ mod utils;
|
|||||||
|
|
||||||
use crate::cli::build_cli;
|
use crate::cli::build_cli;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
use std::panic;
|
||||||
use std::process;
|
use std::process;
|
||||||
|
|
||||||
use self::display::draw_it;
|
use self::display::draw_it;
|
||||||
@@ -19,6 +20,7 @@ use config::get_config;
|
|||||||
use dir_walker::{walk_it, WalkData};
|
use dir_walker::{walk_it, WalkData};
|
||||||
use filter::get_biggest;
|
use filter::get_biggest;
|
||||||
use filter_type::get_all_file_types;
|
use filter_type::get_all_file_types;
|
||||||
|
use rayon::ThreadPoolBuildError;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::cmp::max;
|
use std::cmp::max;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
@@ -154,11 +156,10 @@ fn main() {
|
|||||||
by_filecount,
|
by_filecount,
|
||||||
ignore_hidden: config.get_ignore_hidden(&options),
|
ignore_hidden: config.get_ignore_hidden(&options),
|
||||||
};
|
};
|
||||||
// Larger stack size to handle cases with lots of nested directories
|
let pool = panic::catch_unwind(init_rayon);
|
||||||
rayon::ThreadPoolBuilder::new()
|
if pool.is_err() {
|
||||||
.stack_size(usize::pow(1024, 3))
|
eprintln!("Warning: Could not configure threads {:?}", pool.err());
|
||||||
.build_global()
|
}
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let iso = config.get_iso(&options);
|
let iso = config.get_iso(&options);
|
||||||
let (top_level_nodes, has_errors) = walk_it(simplified_dirs, walk_data);
|
let (top_level_nodes, has_errors) = walk_it(simplified_dirs, walk_data);
|
||||||
@@ -191,3 +192,10 @@ fn main() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn init_rayon() -> Result<(), ThreadPoolBuildError> {
|
||||||
|
// Larger stack size to handle cases with lots of nested directories
|
||||||
|
rayon::ThreadPoolBuilder::new()
|
||||||
|
.stack_size(usize::pow(1024, 3))
|
||||||
|
.build_global()
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user