From 4274822b65d9949cc85ef4affd4c10d6da39ff17 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 22 Apr 2017 09:30:45 -0700 Subject: [PATCH] Simplify number/mod.rs a bunch --- types/src/number/mod.rs | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/types/src/number/mod.rs b/types/src/number/mod.rs index d5b24b3..07ba6e0 100644 --- a/types/src/number/mod.rs +++ b/types/src/number/mod.rs @@ -7,15 +7,12 @@ /// Scheme numbers are complex, literally. pub mod real; -pub mod complex; -mod add; +//pub mod complex; +//mod add; mod math; pub use self::real::Real; -pub use self::complex::Complex; - -use std::any::Any; -use value::*; +//pub use self::complex::Complex; type Int = i64; type Flt = f64; @@ -67,21 +64,6 @@ impl Number { pub fn is_exact(&self) -> bool { self.exact } } -impl Value for Number { - fn as_value(&self) -> &Value { self } -} - -impl ValueEq for Number { - fn eq(&self, other: &Value) -> bool { - other.as_any().downcast_ref::().map_or(false, |x| x == self) - } - fn as_any(&self) -> &Any { self } -} - -impl IsBool for Number { } -impl IsChar for Number { } -impl IsNumber for Number { } - #[cfg(test)] mod tests { use super::Number;