diff options
| author | Jacob Helwig <[email protected]> | 2017-10-07 02:43:42 -0700 |
|---|---|---|
| committer | alex <[email protected]> | 2017-10-07 11:43:42 +0200 |
| commit | 3a4cb18be8ca33d507cbfc88fec79b2a6c5d8bfc (patch) | |
| tree | a1eedc69a54e27cd409dd6195f630e89d461a92c /src/framework/standard/mod.rs | |
| parent | Change default_channel to return a pointer (#179) (diff) | |
| download | serenity-3a4cb18be8ca33d507cbfc88fec79b2a6c5d8bfc.tar.xz serenity-3a4cb18be8ca33d507cbfc88fec79b2a6c5d8bfc.zip | |
Do not to " " if none of the provided delimiters are found (#183)
Diffstat (limited to 'src/framework/standard/mod.rs')
| -rw-r--r-- | src/framework/standard/mod.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs index dc065f0..e1ec1bd 100644 --- a/src/framework/standard/mod.rs +++ b/src/framework/standard/mod.rs @@ -901,13 +901,7 @@ impl Framework for StandardFramework { let mut content = message.content[position..].trim(); content = content[command_length..].trim(); - let delimiter = self.configuration - .delimiters - .iter() - .find(|&d| content.contains(d)) - .map_or(" ", |s| s.as_str()); - - Args::new(&content, delimiter) + Args::new(&content, self.configuration.delimiters.clone()) }; if let Some(error) = self.should_fail( |