Skip to content

Commit

Permalink
Rollup merge of rust-lang#49243 - murarth:stabilize-retain, r=BurntSushi
Browse files Browse the repository at this point in the history
Stabilize method `String::retain`

Closes rust-lang#43874
  • Loading branch information
kennytm authored Mar 28, 2018
2 parents d87c19d + 7c442e5 commit 43f56ce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
23 changes: 0 additions & 23 deletions src/doc/unstable-book/src/library-features/string-retain.md

This file was deleted.

4 changes: 1 addition & 3 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1177,16 +1177,14 @@ impl String {
/// # Examples
///
/// ```
/// #![feature(string_retain)]
///
/// let mut s = String::from("f_o_ob_ar");
///
/// s.retain(|c| c != '_');
///
/// assert_eq!(s, "foobar");
/// ```
#[inline]
#[unstable(feature = "string_retain", issue = "43874")]
#[stable(feature = "string_retain", since = "1.26.0")]
pub fn retain<F>(&mut self, mut f: F)
where F: FnMut(char) -> bool
{
Expand Down

0 comments on commit 43f56ce

Please sign in to comment.