Skip to content

Commit

Permalink
Driver: Move Bitrate import out of crate root. (#53)
Browse files Browse the repository at this point in the history
This is a simple organisational change which moves `crate::Bitrate` to `crate::driver::Bitrate` to slightly clean up the crate root.

This has been tested using `cargo make ready`.
  • Loading branch information
FelixMcFelix committed May 10, 2021
1 parent d303e0a commit 1eed9dd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/serenity/voice_storage/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ use serenity::{
};

use songbird::{
driver::Bitrate,
input::{
self,
cached::{Compressed, Memory},
Input,
},
Bitrate,
Call,
Event,
EventContext,
Expand Down
3 changes: 2 additions & 1 deletion src/driver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ use crate::{
Event,
EventHandler,
};
use audiopus::Bitrate;
/// Opus encoder bitrate settings.
pub use audiopus::{self as opus, Bitrate};
use core::{
future::Future,
pin::Pin,
Expand Down
3 changes: 1 addition & 2 deletions src/driver/tasks/message/core.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#![allow(missing_docs)]

use crate::{
driver::{connection::error::Error, Config},
driver::{connection::error::Error, Bitrate, Config},
events::EventData,
tracks::Track,
Bitrate,
ConnectionInfo,
};
use flume::Sender;
Expand Down
3 changes: 1 addition & 2 deletions src/driver/tasks/message/mixer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
use super::{Interconnect, UdpRxMessage, UdpTxMessage, WsMessage};

use crate::{
driver::{Config, CryptoState},
driver::{Bitrate, Config, CryptoState},
tracks::Track,
Bitrate,
};
use flume::Sender;
use xsalsa20poly1305::XSalsa20Poly1305 as Cipher;
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ pub mod tracks;
#[cfg(feature = "driver-core")]
mod ws;

#[cfg(feature = "driver-core")]
/// Opus encoder bitrate settings.
pub use audiopus::{self as opus, Bitrate};
#[cfg(feature = "driver-core")]
pub use discortp as packet;
#[cfg(feature = "driver-core")]
Expand Down

0 comments on commit 1eed9dd

Please sign in to comment.