|
| 1 | +error: it looks like you're manually copying between slices |
| 2 | + --> $DIR/with_loop_counters.rs:5:5 |
| 3 | + | |
| 4 | +LL | / for i in 3..src.len() { |
| 5 | +LL | | dst[i] = src[count]; |
| 6 | +LL | | count += 1; |
| 7 | +LL | | } |
| 8 | + | |_____^ help: try replacing the loop by: `dst[3..src.len()].clone_from_slice(&src[..(src.len() - 3)]);` |
| 9 | + | |
| 10 | + = note: `-D clippy::manual-memcpy` implied by `-D warnings` |
| 11 | + |
| 12 | +error: it looks like you're manually copying between slices |
| 13 | + --> $DIR/with_loop_counters.rs:11:5 |
| 14 | + | |
| 15 | +LL | / for i in 3..src.len() { |
| 16 | +LL | | dst[count] = src[i]; |
| 17 | +LL | | count += 1; |
| 18 | +LL | | } |
| 19 | + | |_____^ help: try replacing the loop by: `dst[..(src.len() - 3)].clone_from_slice(&src[3..]);` |
| 20 | + |
| 21 | +error: it looks like you're manually copying between slices |
| 22 | + --> $DIR/with_loop_counters.rs:17:5 |
| 23 | + | |
| 24 | +LL | / for i in 0..src.len() { |
| 25 | +LL | | dst[count] = src[i]; |
| 26 | +LL | | count += 1; |
| 27 | +LL | | } |
| 28 | + | |_____^ help: try replacing the loop by: `dst[3..(src.len() + 3)].clone_from_slice(&src[..]);` |
| 29 | + |
| 30 | +error: it looks like you're manually copying between slices |
| 31 | + --> $DIR/with_loop_counters.rs:23:5 |
| 32 | + | |
| 33 | +LL | / for i in 0..src.len() { |
| 34 | +LL | | dst[i] = src[count]; |
| 35 | +LL | | count += 1; |
| 36 | +LL | | } |
| 37 | + | |_____^ help: try replacing the loop by: `dst[..src.len()].clone_from_slice(&src[3..(src.len() + 3)]);` |
| 38 | + |
| 39 | +error: it looks like you're manually copying between slices |
| 40 | + --> $DIR/with_loop_counters.rs:29:5 |
| 41 | + | |
| 42 | +LL | / for i in 3..(3 + src.len()) { |
| 43 | +LL | | dst[i] = src[count]; |
| 44 | +LL | | count += 1; |
| 45 | +LL | | } |
| 46 | + | |_____^ help: try replacing the loop by: `dst[3..((3 + src.len()))].clone_from_slice(&src[..((3 + src.len()) - 3)]);` |
| 47 | + |
| 48 | +error: it looks like you're manually copying between slices |
| 49 | + --> $DIR/with_loop_counters.rs:35:5 |
| 50 | + | |
| 51 | +LL | / for i in 5..src.len() { |
| 52 | +LL | | dst[i] = src[count - 2]; |
| 53 | +LL | | count += 1; |
| 54 | +LL | | } |
| 55 | + | |_____^ help: try replacing the loop by: `dst[5..src.len()].clone_from_slice(&src[(3 - 2)..((src.len() - 2) + 3 - 5)]);` |
| 56 | + |
| 57 | +error: it looks like you're manually copying between slices |
| 58 | + --> $DIR/with_loop_counters.rs:41:5 |
| 59 | + | |
| 60 | +LL | / for i in 3..10 { |
| 61 | +LL | | dst[i] = src[count]; |
| 62 | +LL | | count += 1; |
| 63 | +LL | | } |
| 64 | + | |_____^ help: try replacing the loop by: `dst[3..10].clone_from_slice(&src[5..(10 + 5 - 3)]);` |
| 65 | + |
| 66 | +error: it looks like you're manually copying between slices |
| 67 | + --> $DIR/with_loop_counters.rs:48:5 |
| 68 | + | |
| 69 | +LL | / for i in 0..src.len() { |
| 70 | +LL | | dst[count] = src[i]; |
| 71 | +LL | | dst2[count2] = src[i]; |
| 72 | +LL | | count += 1; |
| 73 | +LL | | count2 += 1; |
| 74 | +LL | | } |
| 75 | + | |_____^ |
| 76 | + | |
| 77 | +help: try replacing the loop by |
| 78 | + | |
| 79 | +LL | dst[3..(src.len() + 3)].clone_from_slice(&src[..]); |
| 80 | +LL | dst2[30..(src.len() + 30)].clone_from_slice(&src[..]); |
| 81 | + | |
| 82 | + |
| 83 | +error: it looks like you're manually copying between slices |
| 84 | + --> $DIR/with_loop_counters.rs:58:5 |
| 85 | + | |
| 86 | +LL | / for i in 0..1 << 1 { |
| 87 | +LL | | dst[count] = src[i + 2]; |
| 88 | +LL | | count += 1; |
| 89 | +LL | | } |
| 90 | + | |_____^ help: try replacing the loop by: `dst[(0 << 1)..((1 << 1) + (0 << 1))].clone_from_slice(&src[2..((1 << 1) + 2)]);` |
| 91 | + |
| 92 | +error: aborting due to 9 previous errors |
| 93 | + |
0 commit comments