aboutsummaryrefslogtreecommitdiff
path: root/src/framework/standard/create_group.rs
diff options
context:
space:
mode:
authorFrançois Triquet <[email protected]>2017-10-04 08:41:54 +0200
committerZeyla Hellyer <[email protected]>2017-10-09 15:47:48 -0700
commitb14650193342297746f985f8794e4b93ceeac52b (patch)
treee43c3b95c22746e7b9ef26cdc9431326a3b384c8 /src/framework/standard/create_group.rs
parentForce `I` to be not implemented outside serenity (diff)
downloadserenity-b14650193342297746f985f8794e4b93ceeac52b.tar.xz
serenity-b14650193342297746f985f8794e4b93ceeac52b.zip
Replace Vec parameters by IntoIterator (#176)
Diffstat (limited to 'src/framework/standard/create_group.rs')
-rw-r--r--src/framework/standard/create_group.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/framework/standard/create_group.rs b/src/framework/standard/create_group.rs
index 1d6d49c..8f6d5ac 100644
--- a/src/framework/standard/create_group.rs
+++ b/src/framework/standard/create_group.rs
@@ -139,8 +139,8 @@ impl CreateGroup {
}
/// Sets roles that are allowed to use the command.
- pub fn allowed_roles(mut self, allowed_roles: Vec<&str>) -> Self {
- self.0.allowed_roles = allowed_roles.iter().map(|x| x.to_string()).collect();
+ pub fn allowed_roles<T: ToString, It: IntoIterator<Item=T>>(mut self, allowed_roles: It) -> Self {
+ self.0.allowed_roles = allowed_roles.into_iter().map(|x| x.to_string()).collect();
self
}