diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-06-02 13:03:58 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2021-06-02 13:03:58 -0400 |
commit | 8c3d0b3fc7cd430b4b8bb91e9e71922404ce5040 (patch) | |
tree | f789aa0f6154f43b2fd741f15b8493200f00c7a4 /src | |
parent | 6c30448de288ff6232d6123d6e0d695ea3ce581c (diff) | |
download | acap-8c3d0b3fc7cd430b4b8bb91e9e71922404ce5040.tar.xz |
kd, vp: Use as_deref()
Diffstat (limited to 'src')
-rw-r--r-- | src/kd.rs | 5 | ||||
-rw-r--r-- | src/vp.rs | 5 |
2 files changed, 4 insertions, 6 deletions
@@ -9,7 +9,6 @@ use crate::util::Ordered; use num_traits::Signed; use std::iter::FromIterator; -use std::ops::Deref; /// A node in a k-d tree. #[derive(Debug)] @@ -158,11 +157,11 @@ where } fn left(self) -> Option<Self> { - self.left.as_ref().map(Box::deref) + self.left.as_deref() } fn right(self) -> Option<Self> { - self.right.as_ref().map(Box::deref) + self.right.as_deref() } } @@ -8,7 +8,6 @@ use num_traits::zero; use std::fmt::{self, Debug, Formatter}; use std::iter::{Extend, FromIterator}; -use std::ops::Deref; /// A node in a VP tree. #[derive(Debug)] @@ -171,11 +170,11 @@ where } fn inside(self) -> Option<Self> { - self.inside.as_ref().map(Box::deref) + self.inside.as_deref() } fn outside(self) -> Option<Self> { - self.outside.as_ref().map(Box::deref) + self.outside.as_deref() } } |