From 2cd2d51ed122395bb46b83525c2c80ce88c43fbc Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sat, 1 Aug 2020 23:23:35 +0300 Subject: [PATCH] chore: remove public access for commands --- src/commands/flush.rs | 1 - src/commands/mod.rs | 16 ++++++++-------- src/commands/ping.rs | 1 - src/commands/pop.rs | 1 - src/commands/push.rs | 1 - src/commands/quit.rs | 1 - src/commands/start.rs | 1 - src/lib.rs | 1 - 8 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/commands/flush.rs b/src/commands/flush.rs index 109a342..8c981c0 100644 --- a/src/commands/flush.rs +++ b/src/commands/flush.rs @@ -1,7 +1,6 @@ use super::StreamCommand; use crate::result::{Error, ErrorKind, Result}; -#[doc(hidden)] #[derive(Debug, Default)] pub struct FlushCommand<'a> { pub collection: &'a str, diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 191d579..f595631 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -15,22 +15,22 @@ mod query; #[cfg(feature = "search")] mod suggest; -pub use quit::QuitCommand; -pub use start::StartCommand; +pub(crate) use quit::QuitCommand; +pub(crate) use start::StartCommand; -pub use ping::PingCommand; +pub(crate) use ping::PingCommand; #[cfg(feature = "ingest")] -pub use flush::FlushCommand; +pub(crate) use flush::FlushCommand; #[cfg(feature = "ingest")] -pub use push::PushCommand; +pub(crate) use pop::PopCommand; #[cfg(feature = "ingest")] -pub use pop::PopCommand; +pub(crate) use push::PushCommand; #[cfg(feature = "search")] -pub use query::QueryCommand; +pub(crate) use query::QueryCommand; #[cfg(feature = "search")] -pub use suggest::SuggestCommand; +pub(crate) use suggest::SuggestCommand; use crate::result::Result; diff --git a/src/commands/ping.rs b/src/commands/ping.rs index fd51536..88ff755 100644 --- a/src/commands/ping.rs +++ b/src/commands/ping.rs @@ -1,7 +1,6 @@ use super::StreamCommand; use crate::result::*; -#[doc(hidden)] #[derive(Debug, Default)] pub struct PingCommand; diff --git a/src/commands/pop.rs b/src/commands/pop.rs index c7ab6c5..dc5dff2 100644 --- a/src/commands/pop.rs +++ b/src/commands/pop.rs @@ -1,7 +1,6 @@ use super::StreamCommand; use crate::result::{Error, ErrorKind, Result}; -#[doc(hidden)] #[derive(Debug, Default)] pub struct PopCommand<'a> { pub collection: &'a str, diff --git a/src/commands/push.rs b/src/commands/push.rs index a64d6ce..3cad05a 100644 --- a/src/commands/push.rs +++ b/src/commands/push.rs @@ -1,7 +1,6 @@ use super::StreamCommand; use crate::result::Result; -#[doc(hidden)] #[derive(Debug, Default)] pub struct PushCommand<'a> { pub collection: &'a str, diff --git a/src/commands/quit.rs b/src/commands/quit.rs index 8bbcd54..ae8cad4 100644 --- a/src/commands/quit.rs +++ b/src/commands/quit.rs @@ -1,7 +1,6 @@ use super::StreamCommand; use crate::result::Result; -#[doc(hidden)] #[derive(Debug, Default)] pub struct QuitCommand; diff --git a/src/commands/start.rs b/src/commands/start.rs index cd19204..a8337b8 100644 --- a/src/commands/start.rs +++ b/src/commands/start.rs @@ -13,7 +13,6 @@ const RE_START_RECEIVED_MESSAGE: &str = r"(?x) buffer\((?P\d+)\) "; -#[doc(hidden)] #[derive(Debug)] pub struct StartCommand { pub mode: ChannelMode, diff --git a/src/lib.rs b/src/lib.rs index c094776..fab0ea4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -71,7 +71,6 @@ mod commands; pub mod result; pub use channel::*; -pub use commands::*; #[macro_use] extern crate lazy_static;