Skip to content

Commit 1aedb4c

Browse files
committed
Remove unnecessary bound from HashMap::try_insert.
1 parent da01455 commit 1aedb4c

File tree

1 file changed

+1
-4
lines changed
  • library/std/src/collections/hash

1 file changed

+1
-4
lines changed

library/std/src/collections/hash/map.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -868,10 +868,7 @@ where
868868
/// assert_eq!(err.value, "b");
869869
/// ```
870870
#[unstable(feature = "map_try_insert", issue = "none")]
871-
pub fn try_insert(&mut self, key: K, value: V) -> Result<&mut V, OccupiedError<'_, K, V>>
872-
where
873-
K: Ord,
874-
{
871+
pub fn try_insert(&mut self, key: K, value: V) -> Result<&mut V, OccupiedError<'_, K, V>> {
875872
match self.entry(key) {
876873
Occupied(entry) => Err(OccupiedError { entry, value }),
877874
Vacant(entry) => Ok(entry.insert(value)),

0 commit comments

Comments
 (0)