about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-04-19 15:52:14 -0700
committerAlex Crichton <alex@alexcrichton.com>2018-04-19 16:53:12 -0700
commitca79ba300a0934864d6ea520f9424d5f08ece687 (patch)
tree1d44ca6449c4b2a3950d4358e6d61043ba6db0e5 /src/libstd
parent65d201f7d682ad921ac6e67ac07f922aa63a8ce4 (diff)
downloadrust-ca79ba300a0934864d6ea520f9424d5f08ece687.tar.gz
rust-ca79ba300a0934864d6ea520f9424d5f08ece687.zip
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 20a4f9b508d..64590fc0d10 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -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) => {