diff options
| author | acdenisSK <[email protected]> | 2017-08-01 06:22:45 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-08-01 06:26:41 +0200 |
| commit | 4f2e47f399a10b281a1638fd7fcd3b945154d52c (patch) | |
| tree | b637e700b3c92586e22bb03709428201e380bfc3 /src | |
| parent | Fix failing tests (#133) (diff) | |
| download | serenity-4f2e47f399a10b281a1638fd7fcd3b945154d52c.tar.xz serenity-4f2e47f399a10b281a1638fd7fcd3b945154d52c.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ext.rs | 21 | ||||
| -rw-r--r-- | src/lib.rs | 2 | ||||
| -rw-r--r-- | src/model/guild/audit_log.rs | 8 |
3 files changed, 2 insertions, 29 deletions
diff --git a/src/ext.rs b/src/ext.rs deleted file mode 100644 index 9518c04..0000000 --- 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; @@ -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 a4dc005..4d2988b 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<V: MapAccess<'de>>(self, mut map: V) -> Result<AuditLogs, V::Error> { let audit_log_entries = loop { - if let Some(key) = map.next_key()? { - match key { - Field::AuditLogEntries => { - break map.next_value::<Vec<AuditLogEntry>>()?; - }, - } + if let Some(Field::AuditLogEntries) = map.next_key()? { + break map.next_value::<Vec<AuditLogEntry>>()?; } }; |