diff options
| author | Maiddog <[email protected]> | 2017-08-26 17:55:43 -0500 |
|---|---|---|
| committer | alex <[email protected]> | 2017-08-27 00:55:43 +0200 |
| commit | 3e0b1032d80a1847558a752e8316d97f9ae58f04 (patch) | |
| tree | ca65390091cb3c0ab98b6497a1447ba69df3d20d /src/cache/mod.rs | |
| parent | Use `$crate` for `Args` (diff) | |
| download | serenity-3e0b1032d80a1847558a752e8316d97f9ae58f04.tar.xz serenity-3e0b1032d80a1847558a752e8316d97f9ae58f04.zip | |
Add ability to play DCA and Opus files. (#148)
Diffstat (limited to 'src/cache/mod.rs')
| -rw-r--r-- | src/cache/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cache/mod.rs b/src/cache/mod.rs index 4aa587f..b92e72f 100644 --- a/src/cache/mod.rs +++ b/src/cache/mod.rs @@ -517,7 +517,7 @@ impl Cache { #[inline] pub fn private_channel<C: Into<ChannelId>>(&self, channel_id: C) --> Option<Arc<RwLock<PrivateChannel>>>{ + -> Option<Arc<RwLock<PrivateChannel>>> { self.private_channels.get(&channel_id.into()).cloned() } @@ -553,9 +553,9 @@ impl Cache { /// ``` pub fn role<G, R>(&self, guild_id: G, role_id: R) -> Option<Role> where G: Into<GuildId>, R: Into<RoleId> { - self.guilds - .get(&guild_id.into()) - .and_then(|g| g.read().unwrap().roles.get(&role_id.into()).cloned()) + self.guilds.get(&guild_id.into()).and_then(|g| { + g.read().unwrap().roles.get(&role_id.into()).cloned() + }) } /// Retrieves a `User` from the cache's [`users`] map, if it exists. |