Closed Antosser closed 10 months ago
This PR adds more derives to the Size struct. The following code was also removed because it could simply be derived.
Size
impl PartialEq<Size> for Size { fn eq(&self, other: &Size) -> bool { self.bytes() == other.bytes() } } impl PartialEq<&Size> for Size { fn eq(&self, other: &&Size) -> bool { self.bytes() == other.bytes() } } impl PartialOrd<Size> for Size { fn partial_cmp(&self, other: &Size) -> Option<core::cmp::Ordering> { self.bytes().partial_cmp(&other.bytes()) } } impl PartialOrd<&Size> for Size { fn partial_cmp(&self, other: &&Size) -> Option<core::cmp::Ordering> { self.bytes().partial_cmp(&other.bytes()) } }
LGTM
This PR adds more derives to the
Size
struct. The following code was also removed because it could simply be derived.