From a4c0a8f693506c1841babe2cd76b4817153b1a03 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 17 Jul 2022 08:57:02 +0300 Subject: chore: use clap v3 derive instead of structopt Sponsored-by: author --- src/bin/roadmap2dot.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/bin/roadmap2dot.rs b/src/bin/roadmap2dot.rs index 45e73ea..e92f41d 100644 --- a/src/bin/roadmap2dot.rs +++ b/src/bin/roadmap2dot.rs @@ -12,22 +12,21 @@ //! crate will be as a library. use anyhow::Result; +use clap::Parser; use roadmap::from_yaml; use std::fs::File; use std::io::Read; use std::path::PathBuf; -use structopt::StructOpt; const LABEL_WIDTH: usize = 20; -#[derive(Debug, StructOpt)] -#[structopt( +#[derive(Debug, Parser)] +#[clap( name = "roadmap2dot", about = "Create a dot graph of a roadmap in YAML" )] struct Opt { - // The input filename. - #[structopt(parse(from_os_str))] + /// The input filename. filename: PathBuf, } -- cgit v1.2.1