From 617a421612750fc23f15840b7a28aa4472dfe87a Mon Sep 17 00:00:00 2001 From: Connor Skees Date: Wed, 19 Aug 2020 03:48:59 -0400 Subject: [PATCH] remove superfluous derives from numbers --- src/value/number/integer.rs | 5 ----- src/value/number/mod.rs | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/value/number/integer.rs b/src/value/number/integer.rs index 714b2b7..03f684b 100644 --- a/src/value/number/integer.rs +++ b/src/value/number/integer.rs @@ -7,7 +7,6 @@ use std::{ use num_bigint::BigInt; use num_traits::{Signed, ToPrimitive, Zero}; -#[derive(Eq, PartialEq)] pub(crate) enum Integer { Small(i64), Big(BigInt), @@ -113,10 +112,6 @@ impl Zero for Integer { Self::Big(v) => v.is_zero(), } } - - fn set_zero(&mut self) { - *self = Self::zero() - } } impl Display for Integer { diff --git a/src/value/number/mod.rs b/src/value/number/mod.rs index f65952b..e836e35 100644 --- a/src/value/number/mod.rs +++ b/src/value/number/mod.rs @@ -226,7 +226,7 @@ impl Num for Number { type FromStrRadixErr = (); #[cold] fn from_str_radix(_: &str, _: u32) -> Result { - unreachable!() + unimplemented!() } } @@ -237,7 +237,7 @@ impl Signed for Number { #[cold] fn abs_sub(&self, _: &Self) -> Self { - unreachable!() + unimplemented!() } #[cold]