mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-23 03:23:33 +00:00
27 lines
791 B
Text
27 lines
791 B
Text
error: this loop could be written as a `while let` loop
|
|
--> $DIR/ice-360.rs:5:5
|
|
|
|
|
LL | / loop {
|
|
LL | |
|
|
LL | |
|
|
LL | | let _ = match iter.next() {
|
|
... |
|
|
LL | |
|
|
LL | | }
|
|
| |_____^ help: try: `while let Some(ele) = iter.next() { .. }`
|
|
|
|
|
= note: `-D clippy::while-let-loop` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::while_let_loop)]`
|
|
|
|
error: empty `loop {}` wastes CPU cycles
|
|
--> $DIR/ice-360.rs:12:9
|
|
|
|
|
LL | loop {}
|
|
| ^^^^^^^
|
|
|
|
|
= help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body
|
|
= note: `-D clippy::empty-loop` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::empty_loop)]`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|