diff options
| author | Lake Lezz <[email protected]> | 2018-08-06 23:45:15 +0200 |
|---|---|---|
| committer | Mishio595 <[email protected]> | 2018-09-16 11:42:22 -0600 |
| commit | 386591edf36fc96274116cd47b228cf6bbb53497 (patch) | |
| tree | e431672d713ca9a984bcd95fd556f2346f0e0a9a /src | |
| parent | Add `impl AsRef<MessageId> for Message` (diff) | |
| download | serenity-386591edf36fc96274116cd47b228cf6bbb53497.tar.xz serenity-386591edf36fc96274116cd47b228cf6bbb53497.zip | |
Prevent sub-group-prefixes to picked.
Diffstat (limited to 'src')
| -rw-r--r-- | src/framework/standard/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs index aa32d11..818f4c4 100644 --- a/src/framework/standard/mod.rs +++ b/src/framework/standard/mod.rs @@ -1053,7 +1053,7 @@ impl Framework for StandardFramework { // we want to make sure that all following matching prefixes are longer // than the last matching one, this prevents picking a wrong prefix, // e.g. "f" instead of "ferris" due to "f" having a lower index in the `Vec`. - longest_matching_prefix_len = prefixes.iter().fold(0, |longest_prefix_len, prefix| + let longest_matching_prefix_len = prefixes.iter().fold(0, |longest_prefix_len, prefix| if prefix.len() > longest_prefix_len && built.starts_with(prefix) && (orginal_round.len() == prefix.len() || built.get(prefix.len()..prefix.len() + 1) == Some(" ")) { |