From f72608375936814d898360fc7c392e385bc19d40 Mon Sep 17 00:00:00 2001 From: finga Date: Thu, 8 Jul 2021 14:13:59 +0200 Subject: [PATCH] Remove unneccessary `pub` declarations --- src/posix/info.rs | 2 +- src/posix/recv.rs | 12 ++++++------ src/posix/send.rs | 12 ++++++------ src/sysv/unlink.rs | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/posix/info.rs b/src/posix/info.rs index 0fd1e76..abf9641 100644 --- a/src/posix/info.rs +++ b/src/posix/info.rs @@ -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 { diff --git a/src/posix/recv.rs b/src/posix/recv.rs index 0b8563a..6d83cef 100644 --- a/src/posix/recv.rs +++ b/src/posix/recv.rs @@ -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, + timeout: Option, /// Deadline until messages are received (format: "%Y-%m-%d %H:%M:%S") #[clap(short, long, conflicts_with = "timeout")] - pub deadline: Option, + deadline: Option, /// Name of the queue #[clap(value_name = "QUEUE")] - pub queue: String, + queue: String, } fn print_message(priority: u32, length: usize, timestamp: bool, msg: &str) { diff --git a/src/posix/send.rs b/src/posix/send.rs index 917679b..d6feefc 100644 --- a/src/posix/send.rs +++ b/src/posix/send.rs @@ -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, + timeout: Option, /// Deadline until messages are sent (format: "%Y-%m-%d %H:%M:%S") #[clap(short, long, conflicts_with = "timeout")] - pub deadline: Option, + deadline: Option, /// 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 { diff --git a/src/sysv/unlink.rs b/src/sysv/unlink.rs index 277edb6..ede5b67 100644 --- a/src/sysv/unlink.rs +++ b/src/sysv/unlink.rs @@ -12,10 +12,10 @@ pub struct Unlink { required_unless_present_any = &["key"], conflicts_with = "key" )] - pub id: Option, + id: Option, /// Key of the queue #[clap(long, short, required_unless_present_any = &["id"], conflicts_with = "id")] - pub key: Option, + key: Option, } impl Unlink {