fix: clippy and rm old code
This commit is contained in:
-17
@@ -1,7 +1,5 @@
|
||||
#![feature(iterator_try_collect, once_cell_try)]
|
||||
|
||||
use std::io::Write;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
mod args;
|
||||
@@ -9,27 +7,12 @@ mod commands;
|
||||
mod sys;
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
// if unsafe { libc::geteuid() } == 0 {
|
||||
// return Err(anyhow::anyhow!(
|
||||
// "the program is not designed to runn as root, priviledge escalation is done by the program itself"
|
||||
// ));
|
||||
// }
|
||||
|
||||
let args = args::Args::parse();
|
||||
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("trace"))
|
||||
// .format(|buf, record| {
|
||||
// writeln!(
|
||||
// buf,
|
||||
// "{}: {}",
|
||||
// record.level(),
|
||||
// record.args()
|
||||
// )
|
||||
// })
|
||||
.format_timestamp(None)
|
||||
.init();
|
||||
|
||||
match args.subcommand {
|
||||
args::Command::Pacfiles => commands::pacfiles(&args),
|
||||
args::Command::Dummy => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user