Tweak some stabilizations in libstd

This commit tweaks a few stable APIs in the `beta` branch before they hit
stable. The `str::is_whitespace` and `str::is_alphanumeric` functions were
deleted (added in #49381, issue at #49657). The `and_modify` APIs added
in #44734 were altered to take a `FnOnce` closure rather than a `FnMut` closure.

Closes #49581
Closes #49657
This commit is contained in:
Alex Crichton
2018-04-19 15:52:14 -07:00
parent 65d201f7d6
commit ca79ba300a
4 changed files with 5 additions and 47 deletions

View File

@@ -2127,8 +2127,8 @@ impl<'a, K, V> Entry<'a, K, V> {
/// assert_eq!(map["poneyland"], 43);
/// ```
#[stable(feature = "entry_and_modify", since = "1.26.0")]
pub fn and_modify<F>(self, mut f: F) -> Self
where F: FnMut(&mut V)
pub fn and_modify<F>(self, f: F) -> Self
where F: FnOnce(&mut V)
{
match self {
Occupied(mut entry) => {