aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/hex.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/hex.rs')
-rw-r--r--src/cmd/hex.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd/hex.rs b/src/cmd/hex.rs
index 48eb02f..143bc43 100644
--- a/src/cmd/hex.rs
+++ b/src/cmd/hex.rs
@@ -6,32 +6,32 @@
use crate::cmd;
use anyhow::Result;
+use clap::Parser;
use std::{
io::{self, Write},
path::PathBuf,
str,
};
-use structopt::StructOpt;
-#[derive(Debug, StructOpt)]
+#[derive(Debug, Parser)]
pub struct Options {
- #[structopt(subcommand)]
+ #[clap(subcommand)]
op: Op,
}
-#[derive(Debug, StructOpt)]
+#[derive(Debug, Parser)]
enum Op {
/// Encode binary data as a hexadecimal string.
Encode {
/// Path to the data to encode. Use `-` for standard in.
- #[structopt(name = "DATA", default_value = "-")]
+ #[clap(name = "DATA", default_value = "-")]
data: PathBuf,
},
/// Decode a hexadecimal string as binary data.
Decode {
/// Path to the data to decode. Use `-` for standard in.
- #[structopt(name = "DATA", default_value = "-")]
+ #[clap(name = "DATA", default_value = "-")]
data: PathBuf,
},
}