about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-04-20 20:40:59 +0000
committerbors <bors@rust-lang.org>2018-04-20 20:40:59 +0000
commita10bb6b592803991b9dedd934ce430ae194d9081 (patch)
treef2aeb76e6ebd1a938966c8325237561099d76bfb /src/libstd
parent05dc5e7d9566115416f6d0b84cc1c71bcf2c8cf4 (diff)
parentca79ba300a0934864d6ea520f9424d5f08ece687 (diff)
Auto merge of #50088 - alexcrichton:std-tweaks, r=sfackler
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
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 14ef8563bb0..4fe5c11beb4 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -2126,8 +2126,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) => {