fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: this expression can be written more simply using `.retain()` 2 --> $DIR/manual_retain.rs:22:5 3 | 4LL | binary_heap = binary_heap.into_iter().filter(|x| x % 2 == 0).collect(); 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `binary_heap.retain(|x| x % 2 == 0)` 6 | 7 = note: `-D clippy::manual-retain` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::manual_retain)]` 9 10error: this expression can be written more simply using `.retain()` 11 --> $DIR/manual_retain.rs:23:5 12 | 13LL | binary_heap = binary_heap.iter().filter(|&x| x % 2 == 0).copied().collect(); 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `binary_heap.retain(|x| x % 2 == 0)` 15 16error: this expression can be written more simply using `.retain()` 17 --> $DIR/manual_retain.rs:24:5 18 | 19LL | binary_heap = binary_heap.iter().filter(|&x| x % 2 == 0).cloned().collect(); 20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `binary_heap.retain(|x| x % 2 == 0)` 21 22error: this expression can be written more simply using `.retain()` 23 --> $DIR/manual_retain.rs:54:5 24 | 25LL | btree_map = btree_map.into_iter().filter(|(k, _)| k % 2 == 0).collect(); 26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `btree_map.retain(|k, _| k % 2 == 0)` 27 28error: this expression can be written more simply using `.retain()` 29 --> $DIR/manual_retain.rs:55:5 30 | 31LL | btree_map = btree_map.into_iter().filter(|(_, v)| v % 2 == 0).collect(); 32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `btree_map.retain(|_, &mut v| v % 2 == 0)` 33 34error: this expression can be written more simply using `.retain()` 35 --> $DIR/manual_retain.rs:56:5 36 | 37LL | / btree_map = btree_map 38LL | | .into_iter() 39LL | | .filter(|(k, v)| (k % 2 == 0) && (v % 2 == 0)) 40LL | | .collect(); 41 | |__________________^ help: consider calling `.retain()` instead: `btree_map.retain(|k, &mut v| (k % 2 == 0) && (v % 2 == 0))` 42 43error: this expression can be written more simply using `.retain()` 44 --> $DIR/manual_retain.rs:78:5 45 | 46LL | btree_set = btree_set.iter().filter(|&x| x % 2 == 0).copied().collect(); 47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `btree_set.retain(|x| x % 2 == 0)` 48 49error: this expression can be written more simply using `.retain()` 50 --> $DIR/manual_retain.rs:79:5 51 | 52LL | btree_set = btree_set.iter().filter(|&x| x % 2 == 0).cloned().collect(); 53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `btree_set.retain(|x| x % 2 == 0)` 54 55error: this expression can be written more simply using `.retain()` 56 --> $DIR/manual_retain.rs:80:5 57 | 58LL | btree_set = btree_set.into_iter().filter(|x| x % 2 == 0).collect(); 59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `btree_set.retain(|x| x % 2 == 0)` 60 61error: this expression can be written more simply using `.retain()` 62 --> $DIR/manual_retain.rs:110:5 63 | 64LL | hash_map = hash_map.into_iter().filter(|(k, _)| k % 2 == 0).collect(); 65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `hash_map.retain(|k, _| k % 2 == 0)` 66 67error: this expression can be written more simply using `.retain()` 68 --> $DIR/manual_retain.rs:111:5 69 | 70LL | hash_map = hash_map.into_iter().filter(|(_, v)| v % 2 == 0).collect(); 71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `hash_map.retain(|_, &mut v| v % 2 == 0)` 72 73error: this expression can be written more simply using `.retain()` 74 --> $DIR/manual_retain.rs:112:5 75 | 76LL | / hash_map = hash_map 77LL | | .into_iter() 78LL | | .filter(|(k, v)| (k % 2 == 0) && (v % 2 == 0)) 79LL | | .collect(); 80 | |__________________^ help: consider calling `.retain()` instead: `hash_map.retain(|k, &mut v| (k % 2 == 0) && (v % 2 == 0))` 81 82error: this expression can be written more simply using `.retain()` 83 --> $DIR/manual_retain.rs:133:5 84 | 85LL | hash_set = hash_set.into_iter().filter(|x| x % 2 == 0).collect(); 86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `hash_set.retain(|x| x % 2 == 0)` 87 88error: this expression can be written more simply using `.retain()` 89 --> $DIR/manual_retain.rs:134:5 90 | 91LL | hash_set = hash_set.iter().filter(|&x| x % 2 == 0).copied().collect(); 92 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `hash_set.retain(|x| x % 2 == 0)` 93 94error: this expression can be written more simply using `.retain()` 95 --> $DIR/manual_retain.rs:135:5 96 | 97LL | hash_set = hash_set.iter().filter(|&x| x % 2 == 0).cloned().collect(); 98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `hash_set.retain(|x| x % 2 == 0)` 99 100error: this expression can be written more simply using `.retain()` 101 --> $DIR/manual_retain.rs:164:5 102 | 103LL | s = s.chars().filter(|&c| c != 'o').to_owned().collect(); 104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `s.retain(|c| c != 'o')` 105 106error: this expression can be written more simply using `.retain()` 107 --> $DIR/manual_retain.rs:176:5 108 | 109LL | vec = vec.iter().filter(|&x| x % 2 == 0).copied().collect(); 110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)` 111 112error: this expression can be written more simply using `.retain()` 113 --> $DIR/manual_retain.rs:177:5 114 | 115LL | vec = vec.iter().filter(|&x| x % 2 == 0).cloned().collect(); 116 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)` 117 118error: this expression can be written more simply using `.retain()` 119 --> $DIR/manual_retain.rs:178:5 120 | 121LL | vec = vec.into_iter().filter(|x| x % 2 == 0).collect(); 122 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)` 123 124error: this expression can be written more simply using `.retain()` 125 --> $DIR/manual_retain.rs:200:5 126 | 127LL | vec_deque = vec_deque.iter().filter(|&x| x % 2 == 0).copied().collect(); 128 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)` 129 130error: this expression can be written more simply using `.retain()` 131 --> $DIR/manual_retain.rs:201:5 132 | 133LL | vec_deque = vec_deque.iter().filter(|&x| x % 2 == 0).cloned().collect(); 134 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)` 135 136error: this expression can be written more simply using `.retain()` 137 --> $DIR/manual_retain.rs:202:5 138 | 139LL | vec_deque = vec_deque.into_iter().filter(|x| x % 2 == 0).collect(); 140 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)` 141 142error: aborting due to 22 previous errors 143