aboutsummaryrefslogtreecommitdiff
path: root/src/gateway
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-10-05 14:12:53 +0200
committerZeyla Hellyer <[email protected]>2017-10-09 15:48:18 -0700
commite0e76173f63b6071b9df3ff8f53371b4b6c4ee1e (patch)
tree26e8e3518471a96e6b8f82cf167ffe758b07300a /src/gateway
parentReplace slice parametres by IntoIterator (#177) (diff)
downloadserenity-e0e76173f63b6071b9df3ff8f53371b4b6c4ee1e.tar.xz
serenity-e0e76173f63b6071b9df3ff8f53371b4b6c4ee1e.zip
Use an as_ref hack
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/shard.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gateway/shard.rs b/src/gateway/shard.rs
index 2c621b1..9304e2f 100644
--- a/src/gateway/shard.rs
+++ b/src/gateway/shard.rs
@@ -671,14 +671,14 @@ impl Shard {
/// ../../model/event/enum.Event.html#variant.GuildMembersChunk
/// [`Guild`]: ../../model/struct.Guild.html
/// [`Member`]: ../../model/struct.Member.html
- pub fn chunk_guilds<'a, It>(&mut self, guild_ids: It, limit: Option<u16>, query: Option<&str>)
- where It: IntoIterator<Item=&'a GuildId>{
+ pub fn chunk_guilds<T: AsRef<GuildId>, It>(&mut self, guild_ids: It, limit: Option<u16>, query: Option<&str>)
+ where It: IntoIterator<Item=T> {
debug!("[Shard {:?}] Requesting member chunks", self.shard_info);
let msg = json!({
"op": OpCode::GetGuildMembers.num(),
"d": {
- "guild_id": guild_ids.into_iter().map(|x| x.0).collect::<Vec<u64>>(),
+ "guild_id": guild_ids.into_iter().map(|x| x.as_ref().0).collect::<Vec<u64>>(),
"limit": limit.unwrap_or(0),
"query": query.unwrap_or(""),
},