wip: drawing table using Content::content

This commit is contained in:
🪞👃🪞 2025-03-17 02:33:43 +02:00
parent c3b9e0d9ec
commit 53132da551
5 changed files with 70 additions and 47 deletions

View file

@ -39,15 +39,17 @@ fn cli () -> clap::Command {
fn main () -> Usually<()> {
let args = cli().get_matches();
let path = if let Some(path) = args.get_one::<PathBuf>("path") {
path.into()
} else {
current_dir()?
};
let threads = args.get_one::<usize>("threads").map(|x|*x).unwrap_or_default().max(1);
set_current_dir(&path)?;
let threads = args.get_one::<usize>("threads").map(|x|*x).unwrap_or(4);
let results = collect(&path, threads)?;
if let Ok(results) = Arc::try_unwrap(results) {
let mut results = results.into_inner()?;
results.sort();