Skip to content

Commit

Permalink
deps: update clap to 3.2
Browse files Browse the repository at this point in the history
Signed-off-by: ljedrz <[email protected]>
  • Loading branch information
ljedrz committed Jun 16, 2022
1 parent 6ba199a commit ffdfcd1
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .crawler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ version = "1"
version = "1"

[dependencies.clap]
version = "3.1"
version = "3.2"
features = [ "derive" ]

[dependencies.nalgebra]
Expand Down
2 changes: 1 addition & 1 deletion .crawler/src/crawler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub struct StorageClient;
#[derive(Debug, Parser)]
pub struct Opts {
/// Specify the IP address and port for the node server.
#[clap(long = "addr", short = 'a', parse(try_from_str), default_value = "0.0.0.0:4132")]
#[clap(long, short, default_value = "0.0.0.0:4132", action)]
pub addr: SocketAddr,
#[cfg(feature = "postgres")]
#[clap(flatten)]
Expand Down
14 changes: 7 additions & 7 deletions .crawler/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,26 @@ use crate::{
#[derive(Debug, Parser)]
pub struct PostgresOpts {
/// The hostname of the postgres instance (defaults to "localhost").
#[clap(long = "postgres-host", default_value = "localhost")]
#[clap(long = "postgres-host", default_value = "localhost", action)]
pub host: String,
/// The port of the postgres instance (defaults to 5432).
#[clap(long = "postgres-port", default_value = "5432")]
#[clap(long = "postgres-port", default_value = "5432", action)]
pub port: u16,
/// The user of the postgres instance (defaults to "postgres").
#[clap(long = "postgres-user", default_value = "postgres")]
#[clap(long = "postgres-user", default_value = "postgres", action)]
pub user: String,
/// The password for the postgres instance (defaults to nothing).
#[clap(long = "postgres-pass", default_value = "")]
#[clap(long = "postgres-pass", default_value = "", action)]
pub pass: String,
/// The hostname of the postgres instance (defaults to "postgres").
#[clap(long = "postgres-dbname", default_value = "postgres")]
#[clap(long = "postgres-dbname", default_value = "postgres", action)]
pub dbname: String,
/// If set to `true`, re-creates the crawler's database tables.
#[clap(long = "postgres-clean")]
#[clap(long = "postgres-clean", action)]
pub clean: bool,
/// The path to a certificate file to be used for a TLS connection with the postgres instance.
#[cfg(feature = "postgres-tls")]
#[clap(long = "postgres-cert-path")]
#[clap(long = "postgres-cert-path", action)]
pub cert_path: PathBuf,
}

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ version = "2.0.2"
version = "0.8.0"

[dependencies.clap]
version = "3.1"
version = "3.2"
features = [ "derive" ]

[dependencies.thiserror]
Expand Down
44 changes: 22 additions & 22 deletions snarkos/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,50 +47,50 @@ use tracing_subscriber::EnvFilter;
#[clap(name = "snarkos", author = "The Aleo Team <[email protected]>")]
pub struct Node {
/// Specify the IP address and port of a peer to connect to.
#[clap(long = "connect")]
#[clap(long, action)]
pub connect: Option<String>,
/// Specify this as a mining node, with the given miner address.
#[clap(long = "miner")]
#[clap(long, action)]
pub miner: Option<String>,
/// Specify this as an operating node, with the given operator address.
#[clap(long = "operator")]
#[clap(long, action)]
pub operator: Option<String>,
/// Specify this as a prover node, with the given prover address.
#[clap(long = "prover")]
#[clap(long, action)]
pub prover: Option<String>,
/// Specify the pool that a prover node is contributing to.
#[clap(long = "pool")]
#[clap(long, action)]
pub pool: Option<SocketAddr>,
/// Specify the network of this node.
#[clap(default_value = "2", long = "network")]
#[clap(long, default_value = "2", action)]
pub network: u16,
/// Specify the IP address and port for the node server.
#[clap(parse(try_from_str), default_value = "0.0.0.0:4132", long = "node")]
#[clap(long, default_value = "0.0.0.0:4132", action)]
pub node: SocketAddr,
/// Specify the IP address and port for the RPC server.
#[clap(parse(try_from_str), default_value = "0.0.0.0:3032", long = "rpc")]
#[clap(long, default_value = "0.0.0.0:3032", action)]
pub rpc: SocketAddr,
/// Specify the username for the RPC server.
#[clap(default_value = "root", long = "username")]
#[clap(default_value = "root", long = "username", action)]
pub rpc_username: String,
/// Specify the password for the RPC server.
#[clap(default_value = "pass", long = "password")]
#[clap(default_value = "pass", long = "password", action)]
pub rpc_password: String,
/// Specify the verbosity of the node [options: 0, 1, 2, 3]
#[clap(default_value = "2", long = "verbosity")]
#[clap(default_value = "2", long, action)]
pub verbosity: u8,
/// Enables development mode, specify a unique ID for the local node.
#[clap(long)]
#[clap(long, action)]
pub dev: Option<u16>,
/// If the flag is set, the node will render a read-only display.
#[clap(long)]
#[clap(long, action)]
pub display: bool,
/// If the flag is set, the node will not initialize the RPC server.
#[clap(long)]
#[clap(long, action)]
pub norpc: bool,
#[clap(hide = true, long)]
#[clap(hide = true, long, action)]
pub trial: bool,
#[clap(hide = true, long)]
#[clap(hide = true, long, action)]
pub sync: bool,
/// Specify an optional subcommand.
#[clap(subcommand)]
Expand Down Expand Up @@ -305,10 +305,10 @@ impl io::Write for LogWriter {
#[derive(Debug, Parser)]
pub struct Clean {
/// Specify the network of the ledger to remove from storage.
#[clap(default_value = "2", long = "network")]
#[clap(long, default_value = "2", action)]
pub network: u16,
/// Enables development mode, specify the unique ID of the local node to clean.
#[clap(long)]
#[clap(long, action)]
pub dev: Option<u16>,
}

Expand Down Expand Up @@ -342,13 +342,13 @@ impl Clean {
#[derive(Debug, Parser)]
pub struct Update {
/// Lists all available versions of snarkOS
#[clap(short = 'l', long)]
#[clap(short, long, action)]
list: bool,
/// Suppress outputs to terminal
#[clap(short = 'q', long)]
#[clap(short, long, action)]
quiet: bool,
/// Update to specified version
#[clap(short = 'v', long)]
#[clap(short, long, action)]
version: Option<String>,
}

Expand Down Expand Up @@ -446,7 +446,7 @@ pub enum MinerCommands {

#[derive(Debug, Parser)]
pub struct MinerStats {
#[clap()]
#[clap(action)]
address: String,
}

Expand Down

0 comments on commit ffdfcd1

Please sign in to comment.