| 55 | } |
| 56 | |
| 57 | fn bang_eq_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 58 | if let Some(other_interval) = other.as_any().downcast_ref::<IntervalValue>() { |
| 59 | let is_not_equals = self.interval != other_interval.interval; |
| 60 | return Ok(Box::new(BoolValue::new(is_not_equals))); |
| 61 | } |
| 62 | Err("Unexpected type to perform `!=` with".to_string()) |
| 63 | } |
| 64 | |
| 65 | fn gt_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 66 | if let Some(other_interval) = other.as_any().downcast_ref::<IntervalValue>() { |