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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user