380 |
// Reuse the arguments passed to Alacritty for the new instance.
|
381 |
#[allow(clippy::while_let_on_iterator)]
|
382 |
while let Some(arg) = env_args.next() {
|
55 |
#[allow(clippy::while_let_on_iterator)]
|
56 |
fn get_bash_quotes<R>(reader: R) -> std::io::Result<Vec<String>>
|
23 |
#[allow(clippy::while_let_on_iterator)] // Ownership shenanigans necessitate this
|
24 |
while let Some(chunk) = chunks.next() {
|
20 |
/// dropped.
|
21 |
#[allow(clippy::while_let_on_iterator)]
|
22 |
pub fn collect_into_array<E, I, T, const N: usize>(iter: &mut I) -> Option<Result<[T; N], E>>
|
20 |
/// dropped.
|
21 |
#[allow(clippy::while_let_on_iterator)]
|
22 |
pub fn collect_into_array<E, I, T, const N: usize>(iter: &mut I) -> Option<Result<[T; N], E>>
|
1095 |
#[allow(clippy::while_let_on_iterator)]
|
1096 |
while let Some(event) = events.next() {
|
674 |
#[allow(clippy::while_let_on_iterator)]
|
675 |
while let Some(event) = footnote_events.next() {
|
40 |
#[allow(clippy::while_let_on_iterator)] // needs to be like that to keep using the iterator
|
41 |
fn next(&mut self) -> Option<Self::Item> {
|
40 |
#[allow(clippy::while_let_on_iterator)] // needs to be like that to keep using the iterator
|
41 |
fn next(&mut self) -> Option<Self::Item> {
|
209 |
#[allow(clippy::while_let_on_iterator)]
|
210 |
while let Some(declarator) = iter_rev.next() {
|
251 |
#[allow(clippy::while_let_on_iterator)]
|
252 |
while let Some(declarator) = iter.next() {
|
39 |
// We have to use a while loop so we can drop() the iterator in the closefrom() case
|
40 |
#[allow(clippy::while_let_on_iterator)]
|
41 |
while let Some(fd) = fditer.next() {
|
299 |
let mut n = 0;
|
300 |
#[allow(clippy::while_let_on_iterator)] //chars is used in the next loop
|
301 |
while let Some((byte_offset, ch)) = chars.next() {
|
181 |
if let Some(value) = parts.next() {
|
182 |
#[allow(clippy::while_let_on_iterator)]
|
183 |
while let Some(arg) = parts.next() {
|
81 |
#[allow(clippy::while_let_on_iterator)]
|
82 |
fn next(&mut self) -> Option<Self::Item> {
|
79 |
#[allow(clippy::while_let_on_iterator)]
|
80 |
fn next(&mut self) -> Option<Self::Item> {
|
119 |
let mut result: Option<&str> = None;
|
120 |
#[allow(clippy::while_let_on_iterator)] // if `for` is used, iter is moved
|
121 |
while let Some((i, c)) = iter.next() {
|
119 |
#[allow(clippy::while_let_on_iterator)]
|
120 |
while let Some(c) = it.next() {
|
138 |
#[allow(clippy::while_let_on_iterator)]
|
139 |
while let Some(c) = it.next() {
|
342 |
#[allow(clippy::while_let_on_iterator)]
|
343 |
while let Some(child) = child_iter.next() {
|
302 |
/// Checks that the given set of indices are sorted by the given compare function.
|
303 |
#[allow(clippy::while_let_on_iterator)]
|
304 |
fn is_sorted_by<F>(indices: &I, mut compare: F) -> bool
|
307 |
/// will fail if the user sets `ignore_surrounding_blank_lines` to `false`!).
|
308 |
#[allow(clippy::while_let_on_iterator)]
|
309 |
fn skip_blank_lines(
|
80 |
// allow: we need to release the borrow on self.inner to call input
|
81 |
#[allow(clippy::while_let_on_iterator)]
|
82 |
while let Some(token) = self.inner.next() {
|
381 |
#[allow(clippy::while_let_on_iterator)]
|
382 |
while let Some(result) = tokenizer.next() {
|
1352 |
// We can't borrow the iterator here (would not be an iterator) and we can't own it using a for-loop
|
1353 |
#[allow(clippy::while_let_on_iterator)]
|
1354 |
while let Some(c) = text_char_it.next() {
|
70 |
pub fn filter_state(&mut self) -> Option<crate::Result<Changes>> {
|
71 |
#[allow(clippy::while_let_on_iterator)]
|
72 |
while let Some(event) = self.next() {
|
259 |
#[allow(clippy::while_let_on_iterator)]
|
260 |
while let Some(event) = parser.next() {
|
348 |
#[allow(clippy::while_let_on_iterator)]
|
349 |
while let Some(element) = self.iter.next() {
|
586 |
// False positive, iterator is also used on inside
|
587 |
#[allow(clippy::while_let_on_iterator)]
|
588 |
while let Some((pos, char)) = self.input.next() {
|
25 |
impl Signature {
|
26 |
#[allow(clippy::while_let_on_iterator)]
|
27 |
pub fn parse(header: &'_ [u8]) -> crate::Result<Self> {
|
94 |
impl Seal {
|
95 |
#[allow(clippy::while_let_on_iterator)]
|
96 |
pub fn parse(header: &'_ [u8]) -> crate::Result<Self> {
|
160 |
impl Results {
|
161 |
#[allow(clippy::while_let_on_iterator)]
|
162 |
pub fn parse(header: &'_ [u8]) -> crate::Result<Self> {
|
60 |
impl TagParser for Iter<'_, u8> {
|
61 |
#[allow(clippy::while_let_on_iterator)]
|
62 |
fn key(&mut self) -> Option<u64> {
|
93 |
#[allow(clippy::while_let_on_iterator)]
|
94 |
fn value(&mut self) -> u64 {
|
122 |
#[allow(clippy::while_let_on_iterator)]
|
123 |
fn flag_value(&mut self) -> (u64, u8) {
|
151 |
#[inline(always)]
|
152 |
#[allow(clippy::while_let_on_iterator)]
|
153 |
fn match_bytes(&mut self, bytes: &[u8]) -> bool {
|
188 |
#[inline(always)]
|
189 |
#[allow(clippy::while_let_on_iterator)]
|
190 |
fn text_qp(&mut self, mut tag: Vec<u8>, to_lower: bool, stop_comma: bool) -> String {
|
46 |
impl Signature {
|
47 |
#[allow(clippy::while_let_on_iterator)]
|
48 |
pub fn parse(header: &'_ [u8]) -> crate::Result<Self> {
|
243 |
impl TxtRecordParser for DomainKey {
|
244 |
#[allow(clippy::while_let_on_iterator)]
|
245 |
fn parse(header: &[u8]) -> crate::Result<Self> {
|
21 |
/// Should never panic.
|
22 |
#[allow(clippy::while_let_on_iterator)]
|
23 |
pub fn tokenize(input: &str) -> LexResult {
|
70 |
#[allow(clippy::while_let_on_iterator)]
|
71 |
let result = html! {
|
70 |
#[allow(clippy::while_let_on_iterator)]
|
71 |
let result = html! {
|
40 |
libinput.dispatch().unwrap();
|
41 |
#[allow(clippy::while_let_on_iterator)]
|
42 |
while let Some(event) = libinput.next() {
|
40 |
libinput.dispatch().unwrap();
|
41 |
#[allow(clippy::while_let_on_iterator)]
|
42 |
while let Some(event) = libinput.next() {
|
49 |
{
|
50 |
#[allow(clippy::while_let_on_iterator)]
|
51 |
while let Some(next) = rule_iter.next() {
|
101 |
if let Some(ref mut current) = current_opt {
|
102 |
#[allow(clippy::while_let_on_iterator)]
|
103 |
while let Some(item) = ranges.next() {
|
144 |
// https://github.com/rust-lang/rust-clippy/issues/7510
|
145 |
#[allow(clippy::while_let_on_iterator)]
|
146 |
while let Some(_) = self.next() {}
|
710 |
/// Process an exported tar stream, and update the detached metadata.
|
711 |
#[allow(clippy::while_let_on_iterator)]
|
712 |
#[context("Replacing detached metadata")]
|
1276 |
#[allow(clippy::while_let_on_iterator)]
|
1277 |
fn next(&mut self) -> Option<Self::Item> {
|
1295 |
impl DoubleEndedIterator for MapxRawVsIter<'_> {
|
1296 |
#[allow(clippy::while_let_on_iterator)]
|
1297 |
fn next_back(&mut self) -> Option<Self::Item> {
|
130 |
));
|
131 |
#[allow(clippy::while_let_on_iterator)]
|
132 |
while let Some(n) = chain_res.next() {
|
879 |
/// Returns metrics, x_offsets, and the max width including trailing whitespace.
|
880 |
#[allow(clippy::while_let_on_iterator)]
|
881 |
fn build_line_metrics(
|
710 |
}
|
711 |
#[cfg_attr(feature = "cargo-clippy", allow(while_let_on_iterator))]
|
712 |
while let Some(value) = iter.next() {
|
156 |
fn next(&mut self) -> Option<(usize, usize)> {
|
157 |
#[allow(clippy::while_let_on_iterator)]
|
158 |
while let Some(next_char) = self.char_iter.next() {
|
138 |
#[cfg_attr(feature = "cargo-clippy", allow(while_let_on_iterator))]
|
139 |
fn next(&mut self) -> Option<&'a T> {
|
200 |
let mut buf = [0; 4];
|
201 |
#[allow(clippy::while_let_on_iterator)]
|
202 |
while let Some((pos, char)) = iter.next() {
|
214 |
#[allow(clippy::while_let_on_iterator)]
|
215 |
while let Some((pos, char)) = iter.next() {
|
94 |
#[allow(clippy::while_let_on_iterator)]
|
95 |
pub fn run(&mut self, input: Input) -> Option<Result<Event, RuntimeError>> {
|
55 |
// in the loop. This does not work with a simple for loop.
|
56 |
#[allow(clippy::while_let_on_iterator)]
|
57 |
while let Some(frame) = reader.next() {
|
1702 |
fn extend_desugared<I: Iterator<Item = T>>(&mut self, mut iterator: I) {
|
1703 |
#[allow(clippy::while_let_on_iterator)]
|
1704 |
while let Some(element) = iterator.next() {
|
1702 |
fn extend_desugared<I: Iterator<Item = T>>(&mut self, mut iterator: I) {
|
1703 |
#[allow(clippy::while_let_on_iterator)]
|
1704 |
while let Some(element) = iterator.next() {
|
104 |
#[allow(clippy::while_let_on_iterator)]
|
105 |
fn next(&mut self) -> Option<Result<T::Command, T::Error>> {
|
333 |
#[allow(clippy::while_let_on_iterator)]
|
334 |
pub fn hashed_value(&mut self) -> Result<u64, Error> {
|
367 |
#[allow(clippy::while_let_on_iterator)]
|
368 |
pub fn hashed_value_long(&mut self) -> Result<u128, Error> {
|
551 |
#[allow(clippy::while_let_on_iterator)]
|
552 |
pub fn text(&mut self) -> Result<String, Error> {
|
576 |
#[allow(clippy::while_let_on_iterator)]
|
577 |
pub fn xtext(&mut self) -> Result<String, Error> {
|
624 |
#[allow(clippy::while_let_on_iterator)]
|
625 |
pub fn seek_char(&mut self, stop_char: u8) -> Result<String, Error> {
|
109 |
let mut prev = None;
|
110 |
#[allow(clippy::while_let_on_iterator)]
|
111 |
while let Some(ch) = chars.next() {
|
117 |
let mut is_terminated = true;
|
118 |
#[allow(clippy::while_let_on_iterator)]
|
119 |
while let Some(ch) = chars.next() {
|
55 |
#[allow(clippy::while_let_on_iterator)]
|
56 |
fn get_bash_quotes<R>(reader: R) -> std::io::Result<Vec<String>>
|
1259 |
#[allow(clippy::while_let_on_iterator)]
|
1260 |
pub fn all(&'p mut self) -> Result<Program, ParserError> {
|
872 |
fn next(&mut self) -> Option<Word<'s>> {
|
873 |
#[allow(clippy::while_let_on_iterator)]
|
874 |
while let Some((i, c)) = self.char_indices.next() {
|
72 |
/// Read from the W5500.
|
73 |
#[allow(clippy::while_let_on_iterator)]
|
74 |
fn read(&mut self, mut address: u16, block: u8, data: &mut [u8]) -> Result<(), Self::Error> {
|
100 |
/// Write to the W5500.
|
101 |
#[allow(clippy::while_let_on_iterator)]
|
102 |
fn write(&mut self, mut address: u16, block: u8, data: &[u8]) -> Result<(), Self::Error> {
|
2126 |
#[allow(clippy::comparison_chain)]
|
2127 |
#[allow(clippy::while_let_on_iterator)]
|
2128 |
fn range_extract(from: i64, cnt: i64, val: &VVal) -> VVal {
|
3087 |
#[allow(clippy::while_let_on_iterator)]
|
3088 |
pub fn reverse(&self) -> VVal {
|
3132 |
#[allow(clippy::while_let_on_iterator)]
|
3133 |
pub fn keys(&self) -> VVal {
|
3185 |
#[allow(clippy::while_let_on_iterator)]
|
3186 |
pub fn values(&self) -> VVal {
|
3258 |
#[allow(clippy::while_let_on_iterator)]
|
3259 |
pub fn enumerate(&self) -> VVal {
|
425 |
#[allow(clippy::while_let_on_iterator)]
|
426 |
std::iter::from_fn(move || {
|
469 |
#[allow(clippy::while_let_on_iterator)]
|
470 |
std::iter::from_fn(move || {
|
1 |
#![allow(clippy::while_let_on_iterator)]
|
1 |
#![allow(clippy::while_let_on_iterator)]
|
1 |
#![allow(clippy::while_let_on_iterator)]
|
15 |
clippy::manual_map, // is not an error
|
16 |
clippy::while_let_on_iterator, // is not an error
|
17 |
clippy::from_iter_instead_of_collect, // using from_iter is good style
|
10 |
#![warn(missing_docs)]
|
11 |
#![allow(clippy::while_let_on_iterator)]
|
32 |
#![warn(missing_docs)]
|
33 |
#![allow(clippy::while_let_on_iterator)]
|
34 |
#![allow(clippy::write_with_newline)]
|
1717 |
mod tests {
|
1718 |
#![allow(clippy::while_let_on_iterator)]
|
1719 |
use super::*;
|
4 |
#![deny(unused_must_use)]
|
5 |
#![allow(clippy::while_let_on_iterator)]
|
5 |
// false positives
|
6 |
#![allow(clippy::while_let_on_iterator)]
|
230 |
clippy::unused_self,
|
231 |
clippy::while_let_on_iterator,
|
232 |
)]
|