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 {
/// Name of the queue
#[clap(value_name = "QUEUE")]
pub queue: String,
queue: String,
}
impl Info {

View file

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

View file

@ -9,22 +9,22 @@ use log::info;
pub struct Send {
/// Set a different priority, priority >= 0
#[clap(short, long, default_value = "0")]
pub priority: u32,
priority: u32,
/// Do not block
#[clap(short, long)]
pub non_blocking: bool,
non_blocking: bool,
/// Timeout, example "5h 23min 42ms"
#[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")
#[clap(short, long, conflicts_with = "timeout")]
pub deadline: Option<String>,
deadline: Option<String>,
/// Name of the queue
#[clap(value_name = "QUEUE")]
pub queue: String,
queue: String,
/// Message to be sent to the queue
#[clap(value_name = "MESSAGE")]
pub msg: String,
msg: String,
}
impl Send {

View file

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