mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
87 lines
2.5 KiB
Text
87 lines
2.5 KiB
Text
error: you seem to be trying to pop elements from a `Vec` in a loop
|
|
--> $DIR/manual_while_let_some.rs:23:9
|
|
|
|
|
LL | let number = numbers.pop().unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::manual-while-let-some` implied by `-D warnings`
|
|
help: consider using a `while..let` loop
|
|
|
|
|
LL ~ while let Some(number) = numbers.pop() {
|
|
LL ~
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
|
--> $DIR/manual_while_let_some.rs:31:9
|
|
|
|
|
LL | let number = val.numbers.pop().unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
LL ~ while let Some(number) = val.numbers.pop() {
|
|
LL ~
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
|
--> $DIR/manual_while_let_some.rs:35:20
|
|
|
|
|
LL | accept_i32(numbers.pop().unwrap());
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
LL ~ while let Some(element) = numbers.pop() {
|
|
LL ~ accept_i32(element);
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
|
--> $DIR/manual_while_let_some.rs:39:20
|
|
|
|
|
LL | accept_i32(numbers.pop().expect(""));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
LL ~ while let Some(element) = numbers.pop() {
|
|
LL ~ accept_i32(element);
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
|
--> $DIR/manual_while_let_some.rs:82:9
|
|
|
|
|
LL | let (a, b) = numbers.pop().unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
LL ~ while let Some((a, b)) = numbers.pop() {
|
|
LL ~
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
|
--> $DIR/manual_while_let_some.rs:86:26
|
|
|
|
|
LL | accept_i32_tuple(numbers.pop().unwrap());
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
LL ~ while let Some(element) = numbers.pop() {
|
|
LL ~ accept_i32_tuple(element);
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
|
--> $DIR/manual_while_let_some.rs:91:9
|
|
|
|
|
LL | let Foo { a, b } = results.pop().unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
LL ~ while let Some(Foo { a, b }) = results.pop() {
|
|
LL ~
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|