Skip to content

Commit

Permalink
Stabilize method String::retain
Browse files Browse the repository at this point in the history
  • Loading branch information
murarth committed Mar 21, 2018
1 parent c19264f commit 7c442e5
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 7c442e5

Please sign in to comment.