aboutsummaryrefslogtreecommitdiff
path: root/src/framework/command.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-07-29 22:53:50 +0200
committeracdenisSK <[email protected]>2017-07-29 22:53:50 +0200
commit0d6965f647396c84b2570e92b63244c3afaea863 (patch)
tree497cb26d44af5deca9afbe5ef9395d27aa3c9a8d /src/framework/command.rs
parentFix imports (diff)
downloadserenity-0d6965f647396c84b2570e92b63244c3afaea863.tar.xz
serenity-0d6965f647396c84b2570e92b63244c3afaea863.zip
Remove a few clones
Diffstat (limited to 'src/framework/command.rs')
-rw-r--r--src/framework/command.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/framework/command.rs b/src/framework/command.rs
index 4e338d4..19b6756 100644
--- a/src/framework/command.rs
+++ b/src/framework/command.rs
@@ -104,15 +104,15 @@ pub fn positions(ctx: &mut Context, msg: &Message, conf: &Configuration) -> Opti
positions.push(x.len());
}
} else {
- for n in conf.prefixes.clone() {
- if msg.content.starts_with(&n) {
+ for n in &conf.prefixes {
+ if msg.content.starts_with(n) {
positions.push(n.len());
}
}
}
} else {
- for n in conf.prefixes.clone() {
- if msg.content.starts_with(&n) {
+ for n in &conf.prefixes {
+ if msg.content.starts_with(n) {
positions.push(n.len());
}
}