From 3571fd02c5856d819592a9c299fb13d90eed6871 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 10 Apr 2017 10:35:17 -0700 Subject: [PATCH] is_complex(), is_real(), and is_rational() are true if the lower type check is true --- types/src/value.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/src/value.rs b/types/src/value.rs index e40827e..1cc93fe 100644 --- a/types/src/value.rs +++ b/types/src/value.rs @@ -23,11 +23,11 @@ pub trait IsNumber { /// Should return `true` if this Value is a number type. fn is_number(&self) -> bool { self.is_complex() || self.is_real() || self.is_rational() || self.is_integer() } /// Should return `true` if this Value is a complex number type. - fn is_complex(&self) -> bool { false } + fn is_complex(&self) -> bool { self.is_real() } /// Should return `true` if this Value is a real number type. - fn is_real(&self) -> bool { false } + fn is_real(&self) -> bool { self.is_rational() } /// Should return `true` if this Value is a rational number type. - fn is_rational(&self) -> bool { false } + fn is_rational(&self) -> bool { self.is_integer() } /// Should return `true` if this Value is a integer number type. fn is_integer(&self) -> bool { false } }