2017-02-07 20:05:30 +00:00
|
|
|
error: the loop variable `i` is only used to index `vec`.
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:38:14
|
2017-05-11 11:15:10 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
38 | for i in 0..vec.len() {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^
|
2017-05-11 11:15:10 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::needless-range-loop` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
38 | for <item> in &vec {
|
2018-05-29 08:56:58 +00:00
|
|
|
| ^^^^^^ ^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: the loop variable `i` is only used to index `vec`.
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:47:14
|
|
|
|
|
|
|
|
|
47 | for i in 0..vec.len() {
|
|
|
|
| ^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
47 | for <item> in &vec {
|
|
|
|
| ^^^^^^ ^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-09-05 10:53:52 +00:00
|
|
|
error: the loop variable `j` is only used to index `STATIC`.
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:52:14
|
|
|
|
|
|
|
|
|
52 | for j in 0..4 {
|
|
|
|
| ^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
52 | for <item> in &STATIC {
|
|
|
|
| ^^^^^^ ^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-09-05 10:53:52 +00:00
|
|
|
error: the loop variable `j` is only used to index `CONST`.
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:56:14
|
|
|
|
|
|
|
|
|
56 | for j in 0..4 {
|
|
|
|
| ^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
56 | for <item> in &CONST {
|
|
|
|
| ^^^^^^ ^^^^^^
|
2017-09-05 10:53:52 +00:00
|
|
|
|
|
|
|
error: the loop variable `i` is used to index `vec`
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:60:14
|
|
|
|
|
|
|
|
|
60 | for i in 0..vec.len() {
|
|
|
|
| ^^^^^^^^^^^^
|
2017-09-05 10:53:52 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
60 | for (i, <item>) in vec.iter().enumerate() {
|
|
|
|
| ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: the loop variable `i` is only used to index `vec2`.
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:68:14
|
|
|
|
|
|
|
|
|
68 | for i in 0..vec.len() {
|
|
|
|
| ^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
68 | for <item> in vec2.iter().take(vec.len()) {
|
|
|
|
| ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: the loop variable `i` is only used to index `vec`.
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:72:14
|
|
|
|
|
|
|
|
|
72 | for i in 5..vec.len() {
|
|
|
|
| ^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
72 | for <item> in vec.iter().skip(5) {
|
|
|
|
| ^^^^^^ ^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: the loop variable `i` is only used to index `vec`.
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:76:14
|
|
|
|
|
|
|
|
|
76 | for i in 0..MAX_LEN {
|
|
|
|
| ^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
76 | for <item> in vec.iter().take(MAX_LEN) {
|
|
|
|
| ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: the loop variable `i` is only used to index `vec`.
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:80:14
|
|
|
|
|
|
|
|
|
80 | for i in 0..=MAX_LEN {
|
|
|
|
| ^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
80 | for <item> in vec.iter().take(MAX_LEN + 1) {
|
|
|
|
| ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: the loop variable `i` is only used to index `vec`.
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:84:14
|
|
|
|
|
|
|
|
|
84 | for i in 5..10 {
|
|
|
|
| ^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
84 | for <item> in vec.iter().take(10).skip(5) {
|
|
|
|
| ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: the loop variable `i` is only used to index `vec`.
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:88:14
|
|
|
|
|
|
|
|
|
88 | for i in 5..=10 {
|
|
|
|
| ^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
88 | for <item> in vec.iter().take(10 + 1).skip(5) {
|
|
|
|
| ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: the loop variable `i` is used to index `vec`
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:92:14
|
|
|
|
|
|
|
|
|
92 | for i in 5..vec.len() {
|
|
|
|
| ^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
92 | for (i, <item>) in vec.iter().enumerate().skip(5) {
|
|
|
|
| ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: the loop variable `i` is used to index `vec`
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:96:14
|
|
|
|
|
|
|
|
|
96 | for i in 5..10 {
|
|
|
|
| ^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using an iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
96 | for (i, <item>) in vec.iter().enumerate().take(10).skip(5) {
|
|
|
|
| ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this range is empty so this for loop will never run
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:100:14
|
2017-05-11 11:15:10 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
100 | for i in 10..0 {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::reverse-range-loop` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
100 | for i in (0..10).rev() {
|
2017-07-10 13:29:29 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this range is empty so this for loop will never run
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:104:14
|
2017-05-11 11:15:10 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
104 | for i in 10..=0 {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
104 | for i in (0...10).rev() {
|
2017-07-10 13:29:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this range is empty so this for loop will never run
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:108:14
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
108 | for i in MAX_LEN..0 {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
108 | for i in (0..MAX_LEN).rev() {
|
2017-07-10 13:29:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this range is empty so this for loop will never run
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:112:14
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
112 | for i in 5..5 {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this range is empty so this for loop will never run
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:137:14
|
2017-05-11 11:15:10 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
137 | for i in 10..5 + 4 {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
137 | for i in (5 + 4..10).rev() {
|
2017-09-05 10:53:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this range is empty so this for loop will never run
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:141:14
|
2017-05-11 11:15:10 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
141 | for i in (5 + 2)..(3 - 1) {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
141 | for i in ((3 - 1)..(5 + 2)).rev() {
|
2017-09-05 10:53:52 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this range is empty so this for loop will never run
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:145:14
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
145 | for i in (5 + 2)..(8 - 1) {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:167:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
167 | for _v in vec.iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^ help: to write this more concisely, try: `&vec`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::explicit-iter-loop` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:169:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
169 | for _v in vec.iter_mut() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut vec`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over containers instead of using explicit iteration methods`
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:172:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
172 | for _v in out_vec.into_iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `out_vec`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::explicit-into-iter-loop` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:175:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
175 | for _v in array.into_iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&array`
|
2017-02-21 11:13:44 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:180:15
|
2017-02-21 11:13:44 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
180 | for _v in [1, 2, 3].iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[1, 2, 3]`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:184:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
184 | for _v in [0; 32].iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[0; 32]`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:189:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
189 | for _v in ll.iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^ help: to write this more concisely, try: `&ll`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:192:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
192 | for _v in vd.iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^ help: to write this more concisely, try: `&vd`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:195:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
195 | for _v in bh.iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^ help: to write this more concisely, try: `&bh`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:198:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
198 | for _v in hm.iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^ help: to write this more concisely, try: `&hm`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:201:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
201 | for _v in bt.iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^ help: to write this more concisely, try: `&bt`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:204:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
204 | for _v in hs.iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^ help: to write this more concisely, try: `&hs`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-09-03 07:19:59 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:207:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
207 | for _v in bs.iter() {}
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^ help: to write this more concisely, try: `&bs`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you are iterating over `Iterator::next()` which is an Option; this will compile but is probably not what you want
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:209:15
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
209 | for _v in vec.iter().next() {}
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2018-10-30 20:25:34 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::iter-next-loop` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you are collect()ing an iterator and throwing away the result. Consider using an explicit for loop to exhaust the iterator
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:216:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
216 | vec.iter().cloned().map(|x| out.push(x)).collect::<Vec<_>>();
|
2017-07-10 13:30:28 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::unused-collect` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you seem to want to iterate on a map's values
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:325:19
|
2017-05-11 11:15:10 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
325 | for (_, v) in &m {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::for-kv-map` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
help: use the corresponding method
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
325 | for v in m.values() {
|
2018-05-29 08:56:58 +00:00
|
|
|
| ^ ^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you seem to want to iterate on a map's values
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:330:19
|
2018-01-29 04:18:11 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
330 | for (_, v) in &*m {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: use the corresponding method
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
330 | for v in (*m).values() {
|
2018-05-29 08:56:58 +00:00
|
|
|
| ^ ^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you seem to want to iterate on a map's values
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:338:19
|
2017-05-11 11:15:10 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
338 | for (_, v) in &mut m {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: use the corresponding method
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
338 | for v in m.values_mut() {
|
2018-05-29 08:56:58 +00:00
|
|
|
| ^ ^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you seem to want to iterate on a map's values
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:343:19
|
2017-05-11 11:15:10 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
343 | for (_, v) in &mut *m {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: use the corresponding method
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
343 | for v in (*m).values_mut() {
|
2018-05-29 08:56:58 +00:00
|
|
|
| ^ ^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: you seem to want to iterate on a map's keys
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:349:24
|
2017-05-11 11:15:10 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
349 | for (k, _value) in rm {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^
|
2017-02-07 20:05:30 +00:00
|
|
|
help: use the corresponding method
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
349 | for k in rm.keys() {
|
2018-05-29 08:56:58 +00:00
|
|
|
| ^ ^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-09-05 00:16:34 +00:00
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:402:14
|
2017-09-05 00:16:34 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
402 | for i in 0..src.len() {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try replacing the loop by: `dst[..src.len()].clone_from_slice(&src[..])`
|
2017-09-05 00:16:34 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::manual-memcpy` implied by `-D warnings`
|
2017-09-05 00:16:34 +00:00
|
|
|
|
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:407:14
|
2017-09-05 10:53:52 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
407 | for i in 0..src.len() {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try replacing the loop by: `dst[10..(src.len() + 10)].clone_from_slice(&src[..])`
|
2017-09-05 10:53:52 +00:00
|
|
|
|
2017-09-05 00:16:34 +00:00
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:412:14
|
2017-09-05 10:53:52 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
412 | for i in 0..src.len() {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try replacing the loop by: `dst[..src.len()].clone_from_slice(&src[10..])`
|
2017-09-05 10:53:52 +00:00
|
|
|
|
2017-09-05 00:16:34 +00:00
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:417:14
|
2017-09-05 10:53:52 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
417 | for i in 11..src.len() {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^^ help: try replacing the loop by: `dst[11..src.len()].clone_from_slice(&src[(11 - 10)..(src.len() - 10)])`
|
2017-09-05 00:16:34 +00:00
|
|
|
|
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:422:14
|
2017-09-05 10:53:52 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
422 | for i in 0..dst.len() {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try replacing the loop by: `dst.clone_from_slice(&src[..dst.len()])`
|
2017-09-05 10:53:52 +00:00
|
|
|
|
2017-09-05 00:16:34 +00:00
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:435:14
|
2017-09-05 10:53:52 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
435 | for i in 10..256 {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^
|
2017-09-05 00:16:34 +00:00
|
|
|
help: try replacing the loop by
|
2017-09-05 10:53:52 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
435 | for i in dst[10..256].clone_from_slice(&src[(10 - 5)..(256 - 5)])
|
|
|
|
436 | dst2[(10 + 500)..(256 + 500)].clone_from_slice(&src[10..256]) {
|
2017-09-05 00:16:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:447:14
|
2017-09-05 00:16:34 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
447 | for i in 10..LOOP_OFFSET {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ help: try replacing the loop by: `dst[(10 + LOOP_OFFSET)..(LOOP_OFFSET + LOOP_OFFSET)].clone_from_slice(&src[(10 - some_var)..(LOOP_OFFSET - some_var)])`
|
2017-09-05 00:16:34 +00:00
|
|
|
|
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:460:14
|
2017-09-05 00:16:34 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
460 | for i in 0..src_vec.len() {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try replacing the loop by: `dst_vec[..src_vec.len()].clone_from_slice(&src_vec[..])`
|
2017-09-05 10:53:52 +00:00
|
|
|
|
2017-09-16 23:17:22 +00:00
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:489:14
|
2017-09-16 23:17:22 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
489 | for i in from..from + src.len() {
|
2018-10-16 04:12:59 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing the loop by: `dst[from..from + src.len()].clone_from_slice(&src[0..(from + src.len() - from)])`
|
|
|
|
|
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:493:14
|
2018-10-16 04:12:59 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
493 | for i in from..from + 3 {
|
2018-10-16 04:12:59 +00:00
|
|
|
| ^^^^^^^^^^^^^^ help: try replacing the loop by: `dst[from..from + 3].clone_from_slice(&src[0..(from + 3 - from)])`
|
|
|
|
|
|
|
|
error: it looks like you're manually copying between slices
|
2018-10-30 20:25:34 +00:00
|
|
|
--> $DIR/for_loop.rs:500:14
|
2018-10-16 04:12:59 +00:00
|
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
500 | for i in 0..src.len() {
|
2018-01-29 04:18:11 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try replacing the loop by: `dst[..src.len()].clone_from_slice(&src[..])`
|
2017-09-16 23:17:22 +00:00
|
|
|
|
2018-10-30 20:25:34 +00:00
|
|
|
error: aborting due to 51 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|