impl<O, T: ?Sized> AsRef<T> for OwningRef<O, T> {
fn as_ref(&self) -> &T {
- &*self
+ self
}
}
impl<O, T: ?Sized> AsRef<T> for OwningRefMut<O, T> {
fn as_ref(&self) -> &T {
- &*self
+ self
}
}
impl<O, T: ?Sized> AsMut<T> for OwningRefMut<O, T> {
fn as_mut(&mut self) -> &mut T {
- &mut *self
+ self
}
}
impl<O, T: ?Sized> Borrow<T> for OwningRef<O, T> {
fn borrow(&self) -> &T {
- &*self
+ self
}
}
T: PartialEq,
{
fn eq(&self, other: &Self) -> bool {
- (&*self as &T).eq(&*other as &T)
+ self.deref().eq(other.deref())
}
}
T: PartialOrd,
{
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
- (&*self as &T).partial_cmp(&*other as &T)
+ self.deref().partial_cmp(other.deref())
}
}
T: Ord,
{
fn cmp(&self, other: &Self) -> Ordering {
- (&*self as &T).cmp(&*other as &T)
+ self.deref().cmp(other.deref())
}
}
T: Hash,
{
fn hash<H: Hasher>(&self, state: &mut H) {
- (&*self as &T).hash(state);
+ self.deref().hash(state);
}
}
T: PartialEq,
{
fn eq(&self, other: &Self) -> bool {
- (&*self as &T).eq(&*other as &T)
+ self.deref().eq(other.deref())
}
}
T: PartialOrd,
{
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
- (&*self as &T).partial_cmp(&*other as &T)
+ self.deref().partial_cmp(other.deref())
}
}
T: Ord,
{
fn cmp(&self, other: &Self) -> Ordering {
- (&*self as &T).cmp(&*other as &T)
+ self.deref().cmp(other.deref())
}
}
T: Hash,
{
fn hash<H: Hasher>(&self, state: &mut H) {
- (&*self as &T).hash(state);
+ self.deref().hash(state);
}
}