Skip to content

Commit

Permalink
a little for-loop to iterator change
Browse files Browse the repository at this point in the history
Also added .vscode to .gitignore, because it may or may not contain some stuff others wouldn't want when they're coding in it.
  • Loading branch information
arqunis committed Aug 16, 2017
1 parent fd47b86 commit bdb34b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
target/

Cargo.lock

.vscode/
4 changes: 1 addition & 3 deletions src/framework/create_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit bdb34b5

Please sign in to comment.