Library: Add compatibility for legacy Tokio 0.2 (#40)
Adds support to the library for tokio 0.2 backward-compatibility. This should hopefully benefit, and prevent lavalink-rs from being blocked on this feature. These can be reached using, e.g., `gateway-tokio-02`, `driver-tokio-02`, `serenity-rustls-tokio-02`, and `serenity-native-tokio-02` features. Naturally, this requires some jiggering about with features and the underlying CI, which has been taken care of. Twilight can't be handled in this way, as their last tokio 0.2 version uses the deprecated Discord Gateway v6.
This commit is contained in:
28
src/lib.rs
28
src/lib.rs
@@ -38,41 +38,41 @@
|
||||
//! [lavalink]: https://github.com/Frederikam/Lavalink
|
||||
|
||||
pub mod constants;
|
||||
#[cfg(feature = "driver")]
|
||||
#[cfg(feature = "driver-core")]
|
||||
pub mod driver;
|
||||
pub mod error;
|
||||
#[cfg(feature = "driver")]
|
||||
#[cfg(feature = "driver-core")]
|
||||
pub mod events;
|
||||
#[cfg(feature = "gateway")]
|
||||
#[cfg(feature = "gateway-core")]
|
||||
mod handler;
|
||||
pub mod id;
|
||||
pub(crate) mod info;
|
||||
#[cfg(feature = "driver")]
|
||||
#[cfg(feature = "driver-core")]
|
||||
pub mod input;
|
||||
#[cfg(feature = "gateway")]
|
||||
#[cfg(feature = "gateway-core")]
|
||||
mod manager;
|
||||
#[cfg(feature = "serenity")]
|
||||
pub mod serenity;
|
||||
#[cfg(feature = "gateway")]
|
||||
#[cfg(feature = "gateway-core")]
|
||||
pub mod shards;
|
||||
#[cfg(feature = "driver")]
|
||||
#[cfg(feature = "driver-core")]
|
||||
pub mod tracks;
|
||||
#[cfg(feature = "driver")]
|
||||
#[cfg(feature = "driver-core")]
|
||||
mod ws;
|
||||
|
||||
#[cfg(feature = "driver")]
|
||||
#[cfg(feature = "driver-core")]
|
||||
pub use audiopus::{self as opus, Bitrate};
|
||||
#[cfg(feature = "driver")]
|
||||
#[cfg(feature = "driver-core")]
|
||||
pub use discortp as packet;
|
||||
#[cfg(feature = "driver")]
|
||||
#[cfg(feature = "driver-core")]
|
||||
pub use serenity_voice_model as model;
|
||||
#[cfg(feature = "driver")]
|
||||
#[cfg(feature = "driver-core")]
|
||||
pub use typemap_rev as typemap;
|
||||
|
||||
#[cfg(test)]
|
||||
use utils as test_utils;
|
||||
|
||||
#[cfg(feature = "driver")]
|
||||
#[cfg(feature = "driver-core")]
|
||||
pub use crate::{
|
||||
driver::Driver,
|
||||
events::{CoreEvent, Event, EventContext, EventHandler, TrackEvent},
|
||||
@@ -80,7 +80,7 @@ pub use crate::{
|
||||
tracks::create_player,
|
||||
};
|
||||
|
||||
#[cfg(feature = "gateway")]
|
||||
#[cfg(feature = "gateway-core")]
|
||||
pub use crate::{handler::*, manager::*};
|
||||
|
||||
#[cfg(feature = "serenity")]
|
||||
|
||||
Reference in New Issue
Block a user