We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 24a1d78 + a6b12c2 commit 084c660Copy full SHA for 084c660
rust-version
@@ -1 +1 @@
1
-81117ff930fbf3792b4f9504e3c6bccc87b10823
+e015ef5b2633960e7653b744d7a1c3d1d336313a
tests/run-pass/vec.rs
@@ -140,6 +140,14 @@ fn swap() {
140
v.swap(2, 2);
141
}
142
143
+fn swap_remove() {
144
+ let mut a = 0;
145
+ let mut b = 1;
146
+ let mut vec = vec![&mut a, &mut b];
147
+
148
+ vec.swap_remove(1);
149
+}
150
151
fn main() {
152
assert_eq!(vec_reallocate().len(), 5);
153
@@ -167,4 +175,5 @@ fn main() {
167
175
168
176
sort();
169
177
swap();
178
+ swap_remove();
170
179
0 commit comments