diff options
| author | Zeyla Hellyer <[email protected]> | 2017-11-09 07:25:16 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-11-09 07:25:16 -0800 |
| commit | 4ff14e38001b0e344480866d34d5aec95234ab8d (patch) | |
| tree | 71a9e5dce4125c8b2ba4435a1617f006db562797 | |
| parent | Fix doc-tests (diff) | |
| download | serenity-4ff14e38001b0e344480866d34d5aec95234ab8d.tar.xz serenity-4ff14e38001b0e344480866d34d5aec95234ab8d.zip | |
Fix parking_lot::{Mutex, RwLock} re-exports
Fix the re-exports for `parking_lot::{Mutex, RwLock}` no longer
functioning due to the conditional compilation gate removal
(`parking_lot` is now always compiled).
Tests have been updated to ensure the functionality of these re-exports.
| -rw-r--r-- | src/prelude.rs | 3 | ||||
| -rw-r--r-- | tests/test_prelude.rs | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/prelude.rs b/src/prelude.rs index 8a361e9..435fb8a 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -16,6 +16,7 @@ pub use error::Error as SerenityError; pub use model::Mentionable; +pub use parking_lot::{Mutex, RwLock}; #[cfg(feature = "client")] pub use client::{Client, ClientError as ClientError, Context, EventHandler}; @@ -25,7 +26,5 @@ pub use gateway::GatewayError; pub use http::HttpError; #[cfg(feature = "model")] pub use model::ModelError; -#[cfg(feature = "parking_lot")] -pub use parking_lot::{Mutex, RwLock}; #[cfg(feature = "voice")] pub use voice::VoiceError; diff --git a/tests/test_prelude.rs b/tests/test_prelude.rs index 2317fc0..7233b2a 100644 --- a/tests/test_prelude.rs +++ b/tests/test_prelude.rs @@ -1,8 +1,11 @@ +#![allow(unused_imports)] + extern crate serenity; -#[allow(unused_imports)] use serenity::prelude::{Mentionable, SerenityError}; -#[allow(unused_imports)] #[cfg(feature = "client")] use serenity::prelude::{Client, ClientError}; + +// parking_lot re-exports +use serenity::prelude::{Mutex, RwLock}; |