aboutsummaryrefslogtreecommitdiff
path: root/src/cache
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-08-04 16:56:48 +0200
committeracdenisSK <[email protected]>2017-08-04 16:56:48 +0200
commit924c44759a79a8467cbf9f616a6aaa54c0e746cb (patch)
tree3bb71995070037781f212d682c01180fd93e0d69 /src/cache
parentMake so content and language can be of different types (diff)
downloadserenity-924c44759a79a8467cbf9f616a6aaa54c0e746cb.tar.xz
serenity-924c44759a79a8467cbf9f616a6aaa54c0e746cb.zip
Remove uneccessary map
Diffstat (limited to 'src/cache')
-rw-r--r--src/cache/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cache/mod.rs b/src/cache/mod.rs
index 5eb2208..ad426d5 100644
--- a/src/cache/mod.rs
+++ b/src/cache/mod.rs
@@ -269,8 +269,8 @@ impl Cache {
/// [`Shard`]: ../gateway/struct.Shard.html
pub fn all_guilds(&self) -> Vec<GuildId> {
self.guilds
- .values()
- .map(|g| g.read().unwrap().id)
+ .keys()
+ .cloned()
.chain(self.unavailable_guilds.iter().cloned())
.collect()
}