diff options
| author | acdenisSK <[email protected]> | 2018-05-26 21:58:45 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2018-05-26 22:17:49 +0200 |
| commit | cc6b5677d8e5ba61a53f7aeae26b66207db9fd3d (patch) | |
| tree | 29d71059ba396511c3bce15049bc444380a9197f /src/framework | |
| parent | help: differentiate whether a command is unavailable in dms or guilds (#319) (diff) | |
| download | serenity-cc6b5677d8e5ba61a53f7aeae26b66207db9fd3d.tar.xz serenity-cc6b5677d8e5ba61a53f7aeae26b66207db9fd3d.zip | |
Switch to match_indices for occurences
Diffstat (limited to 'src/framework')
| -rw-r--r-- | src/framework/standard/args.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/framework/standard/args.rs b/src/framework/standard/args.rs index 1a67bee..dcf328d 100644 --- a/src/framework/standard/args.rs +++ b/src/framework/standard/args.rs @@ -54,7 +54,7 @@ impl<E: StdError> fmt::Display for Error<E> { type Result<T, E> = ::std::result::Result<T, Error<E>>; fn second_quote_occurence(s: &str) -> Option<usize> { - s.chars().enumerate().filter(|&(_, c)| c == '"').nth(1).map(|(pos, _)| pos) + s.match_indices('"').nth(1).map(|(pos, _)| pos) } fn parse_quotes<T: FromStr>(s: &mut String, delimiters: &[String]) -> Result<T, T::Err> |