(&self, other: &Box<dyn Value>)
| 111 | } |
| 112 | |
| 113 | fn mul_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 114 | if let Some(value) = other.as_int() { |
| 115 | let interval = self.interval.mul(value)?; |
| 116 | return Ok(Box::new(IntervalValue::new(interval))); |
| 117 | } |
| 118 | Err("Unexpected type to perform `*` with".to_string()) |
| 119 | } |
| 120 | |
| 121 | fn div_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 122 | if let Some(value) = other.as_int() { |