aboutsummaryrefslogtreecommitdiff
path: root/src/cache
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-09-18 17:48:52 -0700
committerZeyla Hellyer <[email protected]>2017-09-18 17:48:52 -0700
commitdae2cb77b407044f44a7a2790d93efba3891854e (patch)
treebef263c4490536cf8b56e988e71dd1aa43bc2696 /src/cache
parentFix compiles of a variety of feature combinations (diff)
downloadserenity-dae2cb77b407044f44a7a2790d93efba3891854e.tar.xz
serenity-dae2cb77b407044f44a7a2790d93efba3891854e.zip
Apply rustfmt
Diffstat (limited to 'src/cache')
-rw-r--r--src/cache/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cache/mod.rs b/src/cache/mod.rs
index 5d7d153..2bbc9bc 100644
--- a/src/cache/mod.rs
+++ b/src/cache/mod.rs
@@ -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.