aboutsummaryrefslogtreecommitdiff
path: root/src/framework
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2018-06-21 19:19:25 +0200
committeracdenisSK <[email protected]>2018-06-21 19:19:25 +0200
commite74e7e0d501afdfde6d75fc63a8abf36d329d2de (patch)
tree496ff1dc9e11d4e6a054a3d432781afc83f5f94e /src/framework
parentAnd another (function call) repetion (diff)
downloadserenity-e74e7e0d501afdfde6d75fc63a8abf36d329d2de.tar.xz
serenity-e74e7e0d501afdfde6d75fc63a8abf36d329d2de.zip
Directly use the iterator
Diffstat (limited to 'src/framework')
-rw-r--r--src/framework/standard/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs
index c92e5ce..95fa074 100644
--- a/src/framework/standard/mod.rs
+++ b/src/framework/standard/mod.rs
@@ -979,14 +979,14 @@ impl Framework for StandardFramework {
'outer: for position in positions {
let mut built = String::new();
let round = message.content.chars().skip(position).collect::<String>();
- let round = round.trim().split_whitespace().collect::<Vec<&str>>(); // Call to `trim` causes the related bug under the main bug #206 - where the whitespace settings are ignored. The fix is implemented as an additional check inside command::positions
+ let mut round = round.trim().split_whitespace(); // Call to `trim` causes the related bug under the main bug #206 - where the whitespace settings are ignored. The fix is implemented as an additional check inside command::positions
for i in 0..self.configuration.depth {
if i != 0 {
built.push(' ');
}
- built.push_str(match round.get(i) {
+ built.push_str(match round.next() {
Some(piece) => piece,
None => continue 'outer,
});