Skip to content

Commit 43f56ce

Browse files
authored
Rollup merge of rust-lang#49243 - murarth:stabilize-retain, r=BurntSushi
Stabilize method `String::retain` Closes rust-lang#43874
2 parents d87c19d + 7c442e5 commit 43f56ce

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

src/doc/unstable-book/src/library-features/string-retain.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/liballoc/string.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,16 +1177,14 @@ impl String {
11771177
/// # Examples
11781178
///
11791179
/// ```
1180-
/// #![feature(string_retain)]
1181-
///
11821180
/// let mut s = String::from("f_o_ob_ar");
11831181
///
11841182
/// s.retain(|c| c != '_');
11851183
///
11861184
/// assert_eq!(s, "foobar");
11871185
/// ```
11881186
#[inline]
1189-
#[unstable(feature = "string_retain", issue = "43874")]
1187+
#[stable(feature = "string_retain", since = "1.26.0")]
11901188
pub fn retain<F>(&mut self, mut f: F)
11911189
where F: FnMut(char) -> bool
11921190
{

0 commit comments

Comments
 (0)