@@ -245,6 +245,7 @@ impl CharHelpers for Chars<'_> {
246 // Find our target position(s).
246 // Find our target position(s).
247 let head_start = head;
247 let head_start = head;
248+ #[allow(clippy::while_let_on_iterator)] // Clippy's suggestion to fix doesn't work here.
248 while let Some(next_ch) = self.next() {
249 while let Some(next_ch) = self.next() {
249 if prev_ch.is_none() || reached_target(target, prev_ch.unwrap(), next_ch) {
250 if prev_ch.is_none() || reached_target(target, prev_ch.unwrap(), next_ch) {
250 if head == head_start {
251 if head == head_start {