diff options
| author | alex <[email protected]> | 2017-06-14 18:26:01 +0200 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-06-14 09:26:01 -0700 |
| commit | 32e07e4ac822d5cc1118f0db0fc92b549c1aaf81 (patch) | |
| tree | a4db15956faac92d544135de6885d64854a8b31d /src/voice | |
| parent | Use HTTPS Connector with remaining HTTP functions (diff) | |
| download | serenity-32e07e4ac822d5cc1118f0db0fc92b549c1aaf81.tar.xz serenity-32e07e4ac822d5cc1118f0db0fc92b549c1aaf81.zip | |
Switch from #[doc(hidden)] to pub(crate)
Switch from using `#[doc(hidden)]` to hide some internal functions to
`pub(crate)`.
The library now requires rustc 1.18.
Diffstat (limited to 'src/voice')
| -rw-r--r-- | src/voice/handler.rs | 10 | ||||
| -rw-r--r-- | src/voice/manager.rs | 3 | ||||
| -rw-r--r-- | src/voice/mod.rs | 4 | ||||
| -rw-r--r-- | src/voice/threading.rs | 2 |
4 files changed, 5 insertions, 14 deletions
diff --git a/src/voice/handler.rs b/src/voice/handler.rs index e40c6d9..fb157e6 100644 --- a/src/voice/handler.rs +++ b/src/voice/handler.rs @@ -104,16 +104,8 @@ pub struct Handler { impl Handler { /// Creates a new Handler. - /// - /// **Note**: You should never call this yourself, and should instead use - /// [`Manager::join`]. - /// - /// Like, really. Really do not use this. Please. - /// - /// [`Manager::join`]: struct.Manager.html#method.join - #[doc(hidden)] #[inline] - pub fn new(guild_id: GuildId, ws: MpscSender<Value>, user_id: UserId) -> Self { + pub(crate) fn new(guild_id: GuildId, ws: MpscSender<Value>, user_id: UserId) -> Self { Self::new_raw(guild_id, Some(ws), user_id) } diff --git a/src/voice/manager.rs b/src/voice/manager.rs index 67eb7b2..528efe7 100644 --- a/src/voice/manager.rs +++ b/src/voice/manager.rs @@ -28,8 +28,7 @@ pub struct Manager { } impl Manager { - #[doc(hidden)] - pub fn new(ws: MpscSender<Value>, user_id: UserId) -> Manager { + pub(crate) fn new(ws: MpscSender<Value>, user_id: UserId) -> Manager { Manager { handlers: HashMap::new(), user_id: user_id, diff --git a/src/voice/mod.rs b/src/voice/mod.rs index 94e3b40..4707ea8 100644 --- a/src/voice/mod.rs +++ b/src/voice/mod.rs @@ -20,9 +20,9 @@ use self::connection_info::ConnectionInfo; const CRYPTO_MODE: &'static str = "xsalsa20_poly1305"; -#[doc(hidden)] -pub enum Status { +pub(crate) enum Status { Connect(ConnectionInfo), + #[allow(dead_code)] Disconnect, SetReceiver(Option<Box<AudioReceiver>>), SetSender(Option<Box<AudioSource>>), diff --git a/src/voice/threading.rs b/src/voice/threading.rs index 4777231..fe0aebc 100644 --- a/src/voice/threading.rs +++ b/src/voice/threading.rs @@ -5,7 +5,7 @@ use super::Status; use ::internal::Timer; use ::model::GuildId; -pub fn start(guild_id: GuildId, rx: MpscReceiver<Status>) { +pub(crate) fn start(guild_id: GuildId, rx: MpscReceiver<Status>) { let name = format!("Serenity Voice (G{})", guild_id); ThreadBuilder::new() |