From 4f2e47f399a10b281a1638fd7fcd3b945154d52c Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Tue, 1 Aug 2017 06:22:45 +0200 Subject: [PATCH] Remove the `ext` module and remove a match The `ext` has existed for a long while just for backwards compatibility. But then again, majority of people should have migrated to the current modules already; making this module useless to keep in the library. --- src/ext.rs | 21 --------------------- src/lib.rs | 2 -- src/model/guild/audit_log.rs | 8 ++------ 3 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 src/ext.rs diff --git a/src/ext.rs b/src/ext.rs deleted file mode 100644 index 9518c0436b2..00000000000 --- a/src/ext.rs +++ /dev/null @@ -1,21 +0,0 @@ -//! A set of extended functionality that is not required for a `Client` and/or -//! `Shard` to properly function. -//! -//! These are flagged behind feature-gates and can be enabled and disabled. -//! -//! See each extension's module-level documentation for more information. -//! -//! Note that the framework module requires the `framework` feature to be -//! enabled (enabled by default), the cache requires the `cache` feature to be -//! enabled (enabled by default), and voice support requires the `voice` feature -//! to be enabled (disabled by default). -//! -//! **Note**: This module exists for backwards compatibility purposes. Instead, -//! prefer to use the root modules directly. - -#[cfg(feature = "cache")] -pub use super::cache; -#[cfg(feature = "buitin_framework")] -pub use super::framework; -#[cfg(feature = "voice")] -pub use super::voice; diff --git a/src/lib.rs b/src/lib.rs index a188ad28eab..176834c37ae 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -142,8 +142,6 @@ pub mod builder; pub mod cache; #[cfg(feature = "client")] pub mod client; -#[cfg(any(feature = "cache", feature = "builtin_framework", feature = "voice"))] -pub mod ext; #[cfg(feature = "builtin_framework")] pub mod framework; #[cfg(feature = "gateway")] diff --git a/src/model/guild/audit_log.rs b/src/model/guild/audit_log.rs index a4dc005cbb7..4d2988bef56 100644 --- a/src/model/guild/audit_log.rs +++ b/src/model/guild/audit_log.rs @@ -304,12 +304,8 @@ impl<'de> Deserialize<'de> for AuditLogs { fn visit_map>(self, mut map: V) -> Result { let audit_log_entries = loop { - if let Some(key) = map.next_key()? { - match key { - Field::AuditLogEntries => { - break map.next_value::>()?; - }, - } + if let Some(Field::AuditLogEntries) = map.next_key()? { + break map.next_value::>()?; } };