You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dirstat/src/main.rs

46 lines
758 B

#![allow(dead_code)]
#[macro_use] extern crate pin_project;
use color_eyre::{
eyre::{
self,
eyre,
WrapErr as _,
},
Help as _,
};
#[macro_use] mod ext;
pub use ext::prelude::*;
mod data;
4 years ago
mod config;
mod state;
mod work;
async fn read_config() -> eyre::Result<config::Config>
{
Ok(config::Config::default()) //TODO: read config
}
#[tokio::main]
async fn main() -> eyre::Result<()> {
color_eyre::install()?;
let state = state::State::new(read_config().await
.wrap_err(eyre!("Failed to load config"))?
.validate()
.wrap_err(eyre!("Invalid config"))
.with_suggestion(|| "Try running `--help`")?);
let graph = work::work_on_all(state).await;
println!("{:?}", graph);
Ok(())
}