use impl instead of intoiterator

This commit is contained in:
Edgar 2021-05-20 21:54:36 +02:00 committed by Edgar Luque
parent 005eb12cfe
commit 652dec950c
No known key found for this signature in database
GPG key ID: 8731E6C0166EAA85

View file

@ -293,10 +293,7 @@ impl HighlightConfiguration {
///
/// When highlighting, results are returned as `Highlight` values, which contain the index
/// of the matched highlight this list of highlight names.
pub fn configure<'a, I, J>(&mut self, recognized_names: &I)
where
I: IntoIterator<Item = &'a J> + Copy,
J: AsRef<str> + 'a,
pub fn configure(&mut self, recognized_names: &[impl AsRef<str>])
{
let mut capture_parts = Vec::new();
self.highlight_indices.clear();