Skip to content

Commit

Permalink
Merge pull request #336 from andrewdavidmackenzie/pigg-326
Browse files Browse the repository at this point in the history
Add a "--help" argument to both binaries using clap
  • Loading branch information
sundaram123krishnan authored Aug 7, 2024
2 parents f67adaf + 3ded658 commit 196011a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 30 deletions.
62 changes: 35 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ tempfile = "3"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rfd = "0.14.1"
clap = { version = "4.5.11", default-features = false, features = ["std"] }
clap = { version = "4.5.13", default-features = false, features = ["std", "help", "error-context"]}

[target.aarch64-unknown-linux-gnu.dependencies]
rppal = "0.18.0"
Expand Down
4 changes: 2 additions & 2 deletions src/piglet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::time::Duration;
use std::{env, fs, io, process};

use anyhow::Context;
use clap::{Arg, ArgMatches, Command};
use clap::{Arg, ArgMatches};
use futures_lite::StreamExt;
use iroh_net::endpoint::Connection;
use iroh_net::relay::RelayUrl;
Expand Down Expand Up @@ -152,7 +152,7 @@ fn setup_logging(matches: &ArgMatches) {

/// Parse the command line arguments using clap
fn get_matches() -> ArgMatches {
let app = Command::new(env!("CARGO_BIN_NAME")).version(env!("CARGO_PKG_VERSION"));
let app = clap::Command::new(env!("CARGO_BIN_NAME")).version(env!("CARGO_PKG_VERSION"));

let app = app.about(
"'piglet' - for making Raspberry Pi GPIO hardware accessible remotely using 'piggui'",
Expand Down

0 comments on commit 196011a

Please sign in to comment.