We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3304e00 commit 8a02141Copy full SHA for 8a02141
src/libcollections/vec.rs
@@ -1298,13 +1298,13 @@ impl<T: PartialEq> Vec<T> {
1298
}
1299
1300
#[unstable(feature = "vec_remove_item", reason = "recently added", issue = "38143")]
1301
- pub fn remove_item(&mut self, item: &T) -> Option<(usize, T)> {
+ pub fn remove_item(&mut self, item: &T) -> Option<T> {
1302
let pos = match self.iter().position(|x| *x == *item) {
1303
Some(x) => x,
1304
None => return None,
1305
};
1306
1307
- Some((pos, self.remove(pos)))
+ Some(self.remove(pos))
1308
1309
1310
0 commit comments