(&self, other: &Box<dyn Value>)
| 114 | } |
| 115 | |
| 116 | fn and_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 117 | if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() { |
| 118 | let value = self.value & other_int.value; |
| 119 | return Ok(Box::new(IntValue::new(value))); |
| 120 | } |
| 121 | Err("Unexpected type to perform `&` with".to_string()) |
| 122 | } |
| 123 | |
| 124 | fn xor_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 125 | if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() { |
no test coverage detected