(&self, other: &Box<dyn Value>)
| 87 | } |
| 88 | |
| 89 | fn rem_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 90 | if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() { |
| 91 | let value = self.value % other_int.value; |
| 92 | return Ok(Box::new(IntValue::new(value))); |
| 93 | } |
| 94 | Err("Unexpected type to perform `%` with".to_string()) |
| 95 | } |
| 96 | |
| 97 | fn caret_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 98 | if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() { |
no test coverage detected