aboutsummaryrefslogtreecommitdiff
path: root/src/framework/standard/configuration.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/framework/standard/configuration.rs')
-rw-r--r--src/framework/standard/configuration.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/framework/standard/configuration.rs b/src/framework/standard/configuration.rs
index 8112319..8cc25fa 100644
--- a/src/framework/standard/configuration.rs
+++ b/src/framework/standard/configuration.rs
@@ -352,8 +352,8 @@ impl Configuration {
/// client.with_framework(StandardFramework::new().configure(|c| c
/// .prefixes(vec!["!", ">", "+"])));
/// ```
- pub fn prefixes(mut self, prefixes: Vec<&str>) -> Self {
- self.prefixes = prefixes.iter().map(|x| x.to_string()).collect();
+ pub fn prefixes<T: ToString, It: IntoIterator<Item=T>>(mut self, prefixes: It) -> Self {
+ self.prefixes = prefixes.into_iter().map(|x| x.to_string()).collect();
self
}
@@ -401,7 +401,7 @@ impl Configuration {
/// client.with_framework(StandardFramework::new().configure(|c| c
/// .delimiters(vec![", ", " "])));
/// ```
- pub fn delimiters(mut self, delimiters: Vec<&str>) -> Self {
+ pub fn delimiters<T: ToString, It: IntoIterator<Item=T>>(mut self, delimiters: It) -> Self {
self.delimiters.clear();
self.delimiters
.extend(delimiters.into_iter().map(|s| s.to_string()));