Remove unneccessary pub declarations

This commit is contained in:
finga 2021-07-08 14:13:59 +02:00
parent cc19087195
commit f726083759
4 changed files with 15 additions and 15 deletions

View file

@ -7,7 +7,7 @@ use posixmq::PosixMq;
pub struct Info { pub struct Info {
/// Name of the queue /// Name of the queue
#[clap(value_name = "QUEUE")] #[clap(value_name = "QUEUE")]
pub queue: String, queue: String,
} }
impl Info { impl Info {

View file

@ -11,22 +11,22 @@ use std::str;
pub struct Recv { pub struct Recv {
/// Do not block /// Do not block
#[clap(short, long)] #[clap(short, long)]
pub non_blocking: bool, non_blocking: bool,
/// Print messages as they are received /// Print messages as they are received
#[clap(short, long)] #[clap(short, long)]
pub follow: bool, follow: bool,
/// Print a timestamp before each message /// Print a timestamp before each message
#[clap(short, long)] #[clap(short, long)]
pub timestamp: bool, timestamp: bool,
/// Timeout, example "5h 23min 42ms" /// Timeout, example "5h 23min 42ms"
#[clap(short = 'o', long, conflicts_with = "deadline")] #[clap(short = 'o', long, conflicts_with = "deadline")]
pub timeout: Option<String>, timeout: Option<String>,
/// Deadline until messages are received (format: "%Y-%m-%d %H:%M:%S") /// Deadline until messages are received (format: "%Y-%m-%d %H:%M:%S")
#[clap(short, long, conflicts_with = "timeout")] #[clap(short, long, conflicts_with = "timeout")]
pub deadline: Option<String>, deadline: Option<String>,
/// Name of the queue /// Name of the queue
#[clap(value_name = "QUEUE")] #[clap(value_name = "QUEUE")]
pub queue: String, queue: String,
} }
fn print_message(priority: u32, length: usize, timestamp: bool, msg: &str) { fn print_message(priority: u32, length: usize, timestamp: bool, msg: &str) {

View file

@ -9,22 +9,22 @@ use log::info;
pub struct Send { pub struct Send {
/// Set a different priority, priority >= 0 /// Set a different priority, priority >= 0
#[clap(short, long, default_value = "0")] #[clap(short, long, default_value = "0")]
pub priority: u32, priority: u32,
/// Do not block /// Do not block
#[clap(short, long)] #[clap(short, long)]
pub non_blocking: bool, non_blocking: bool,
/// Timeout, example "5h 23min 42ms" /// Timeout, example "5h 23min 42ms"
#[clap(short = 'o', long, conflicts_with = "deadline")] #[clap(short = 'o', long, conflicts_with = "deadline")]
pub timeout: Option<String>, timeout: Option<String>,
/// Deadline until messages are sent (format: "%Y-%m-%d %H:%M:%S") /// Deadline until messages are sent (format: "%Y-%m-%d %H:%M:%S")
#[clap(short, long, conflicts_with = "timeout")] #[clap(short, long, conflicts_with = "timeout")]
pub deadline: Option<String>, deadline: Option<String>,
/// Name of the queue /// Name of the queue
#[clap(value_name = "QUEUE")] #[clap(value_name = "QUEUE")]
pub queue: String, queue: String,
/// Message to be sent to the queue /// Message to be sent to the queue
#[clap(value_name = "MESSAGE")] #[clap(value_name = "MESSAGE")]
pub msg: String, msg: String,
} }
impl Send { impl Send {

View file

@ -12,10 +12,10 @@ pub struct Unlink {
required_unless_present_any = &["key"], required_unless_present_any = &["key"],
conflicts_with = "key" conflicts_with = "key"
)] )]
pub id: Option<i32>, id: Option<i32>,
/// Key of the queue /// Key of the queue
#[clap(long, short, required_unless_present_any = &["id"], conflicts_with = "id")] #[clap(long, short, required_unless_present_any = &["id"], conflicts_with = "id")]
pub key: Option<i32>, key: Option<i32>,
} }
impl Unlink { impl Unlink {