Skip to content

Commit

Permalink
Switch to match_indices for occurences
Browse files Browse the repository at this point in the history
  • Loading branch information
arqunis committed May 26, 2018
1 parent 89a18aa commit cc6b567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/framework/standard/args.rs
Expand Up @@ -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>
Expand Down

0 comments on commit cc6b567

Please sign in to comment.