Skip to content

Commit

Permalink
Change the example interface name to the correct one
Browse files Browse the repository at this point in the history
Signed-off-by: asakiz <asakizin@gmail.com>
  • Loading branch information
Asakiz authored and otavio committed Apr 23, 2020
1 parent 4a875b3 commit bf35a21
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/uncompress.rs
Expand Up @@ -16,15 +16,15 @@ struct TopLevel {
#[derive(FromArgs, PartialEq, Debug)]
#[argh(subcommand)]
enum CmdLine {
UncompressFile(SubCommandUncompressFile),
UncompressData(SubCommandUncompressData),
UncompressArchiveFile(SubCommandUncompressArchiveFile),
UncompressArchive(SubCommandUncompressArchive),
}

#[derive(FromArgs, PartialEq, Debug)]
/// Uncompress subcommand.
#[argh(subcommand, name = "uncompress-file")]
struct SubCommandUncompressFile {
/// Uncompress data subcommand.
#[argh(subcommand, name = "uncompress-data")]
struct SubCommandUncompressData {
/// source path
#[argh(positional)]
source_path: String,
Expand Down Expand Up @@ -72,7 +72,7 @@ fn main() -> compress_tools::Result<()> {
let cmd: TopLevel = argh::from_env();

match cmd.nested {
CmdLine::UncompressFile(input) => {
CmdLine::UncompressData(input) => {
let mut source = std::fs::File::open(input.source_path)?;
let mut target = std::fs::File::open(input.target_path)?;

Expand Down

0 comments on commit bf35a21

Please sign in to comment.