Skip to content

Commit

Permalink
Fix the bounds on K for the Send impl of IterMut
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed May 30, 2019
1 parent 1889600 commit a4eba4f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,11 @@ pub struct IterMut<'a, K, V> {
marker: PhantomData<(&'a K, &'a mut V)>,
}

// We override the default Send impl which has K: Sync instead of K: Send. Both
// are correct, but this one is more general since it allows keys which
// implement Send but not Sync.
unsafe impl<K: Send, V: Send> Send for IterMut<'_, K, V> {}

impl<K, V> IterMut<'_, K, V> {
/// Returns a iterator of references over the remaining items.
#[inline]
Expand Down

0 comments on commit a4eba4f

Please sign in to comment.