aboutsummaryrefslogtreecommitdiff
path: root/src/framework/create_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/framework/create_command.rs')
-rw-r--r--src/framework/create_command.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/framework/create_command.rs b/src/framework/create_command.rs
index d2ae31f..495fdd6 100644
--- a/src/framework/create_command.rs
+++ b/src/framework/create_command.rs
@@ -11,9 +11,7 @@ pub struct CreateCommand(pub Command);
impl CreateCommand {
/// Adds multiple aliases.
pub fn batch_known_as(mut self, names: Vec<&str>) -> Self {
- for n in names {
- self.0.aliases.push(n.to_owned());
- }
+ self.0.aliases.extend(names.into_iter().map(|n| n.to_owned()));
self
}