From 0d6965f647396c84b2570e92b63244c3afaea863 Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Sat, 29 Jul 2017 22:53:50 +0200 Subject: Remove a few clones --- src/framework/command.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/framework/command.rs') 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()); } } -- cgit v1.2.3