diff --git a/crossbeam-skiplist/src/set.rs b/crossbeam-skiplist/src/set.rs index b007d2a88..7ffe477ea 100644 --- a/crossbeam-skiplist/src/set.rs +++ b/crossbeam-skiplist/src/set.rs @@ -3,6 +3,7 @@ use std::borrow::Borrow; use std::fmt; use std::iter::FromIterator; +use std::ops::Deref; use std::ops::{Bound, RangeBounds}; use crate::map; @@ -281,6 +282,14 @@ where } } +impl Deref for Entry<'_, T> { + type Target = T; + + fn deref(&self) -> &Self::Target { + self.value() + } +} + /// An owning iterator over the entries of a `SkipSet`. pub struct IntoIter { inner: map::IntoIter,