Skip to content

Commit

Permalink
Updated tracking issue
Browse files Browse the repository at this point in the history
removed line breaks, removed trailing whitespace, travis ci should compile now
  • Loading branch information
madseagames committed Feb 23, 2017
1 parent 37057e7 commit e86846d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ impl<T: PartialEq> Vec<T> {
pub fn dedup(&mut self) {
self.dedup_by(|a, b| a == b)
}

/// Removes the first instance of `item` from the vector if the item exists.
///
/// # Examples
Expand All @@ -1308,13 +1308,12 @@ impl<T: PartialEq> Vec<T> {
///
/// assert_eq!(vec, vec![2, 3, 1]);
/// ```
#[unstable(feature = "vec_remove_item", reason = "recently added", issue = "38143")]
#[unstable(feature = "vec_remove_item", reason = "recently added", issue = "40062")]
pub fn remove_item(&mut self, item: &T) -> Option<T> {
let pos = match self.iter().position(|x| *x == *item) {
Some(x) => x,
None => return None,
};

Some(self.remove(pos))
}
}
Expand Down

0 comments on commit e86846d

Please sign in to comment.