2019-05-08 09:19:08 +02:00
|
|
|
error: this loop could be written as a `while let` loop
|
|
|
|
--> $DIR/ice-360.rs:5:5
|
|
|
|
|
|
|
|
|
LL | / loop {
|
|
|
|
LL | | let _ = match iter.next() {
|
|
|
|
LL | | Some(ele) => ele,
|
|
|
|
LL | | None => break,
|
|
|
|
LL | | };
|
|
|
|
LL | | loop {}
|
|
|
|
LL | | }
|
|
|
|
| |_____^ help: try: `while let Some(ele) = iter.next() { .. }`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::while-let-loop` implied by `-D warnings`
|
|
|
|
|
2020-10-12 01:04:33 +02:00
|
|
|
error: empty `loop {}` wastes CPU cycles
|
2019-05-08 09:19:08 +02:00
|
|
|
--> $DIR/ice-360.rs:10:9
|
|
|
|
|
|
|
|
|
LL | loop {}
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::empty-loop` implied by `-D warnings`
|
2020-11-08 12:40:41 +01:00
|
|
|
= help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body
|
2019-05-08 09:19:08 +02:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|