(&self, other: &Box<dyn Value>)
| 103 | } |
| 104 | |
| 105 | fn sub_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 106 | if let Some(other_interval) = other.as_any().downcast_ref::<IntervalValue>() { |
| 107 | let interval = self.interval.sub(&other_interval.interval)?; |
| 108 | return Ok(Box::new(IntervalValue::new(interval))); |
| 109 | } |
| 110 | Err("Unexpected type to perform `-` with".to_string()) |
| 111 | } |
| 112 | |
| 113 | fn mul_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 114 | if let Some(value) = other.as_int() { |