From e217b3ee27f75ffc2b27753bc88cca8a9342307b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 4 Mar 2022 22:08:42 -0500 Subject: move to clap 3 --- src/main.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index b3e2fd5..ca175d0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,13 +26,15 @@ mod shell; use prelude::*; -#[derive(structopt::StructOpt)] -#[structopt(about = "NoteBook SHell")] +use clap::Parser as _; + +#[derive(clap::Parser)] +#[clap(about = "NoteBook SHell")] struct Opt { - #[structopt(short = "c")] + #[clap(short = 'c')] command: Option, - #[structopt(long)] + #[clap(long)] status_fd: Option, } @@ -53,9 +55,8 @@ async fn async_main(opt: Opt) -> Result { shell::main().await } -#[paw::main] -fn main(opt: Opt) { - match async_main(opt) { +fn main() { + match async_main(Opt::parse()) { Ok(code) => { std::process::exit(code); } -- cgit v1.2.3-54-g00ecf