aboutsummaryrefslogtreecommitdiff
path: root/src/gateway/shard.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-10-05 14:12:53 +0200
committeracdenisSK <[email protected]>2017-10-05 14:12:53 +0200
commit650943f9b3ef1d22b970bccf2952c89f0585d250 (patch)
treec38cba24933123ecfd339927937ddb43db217583 /src/gateway/shard.rs
parentReplace slice parametres by IntoIterator (#177) (diff)
downloadserenity-650943f9b3ef1d22b970bccf2952c89f0585d250.tar.xz
serenity-650943f9b3ef1d22b970bccf2952c89f0585d250.zip
Use an as_ref hack
Diffstat (limited to 'src/gateway/shard.rs')
-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(""),
},