(&self, other: &Box<dyn Value>)
| 66 | } |
| 67 | |
| 68 | fn logical_and_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 69 | if let Some(other_bool) = other.as_any().downcast_ref::<BoolValue>() { |
| 70 | return Ok(Box::new(BoolValue::new(self.value && other_bool.value))); |
| 71 | } |
| 72 | Err("Unexpected type to perform `&&` with".to_string()) |
| 73 | } |
| 74 | |
| 75 | fn logical_xor_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> { |
| 76 | if let Some(other_bool) = other.as_any().downcast_ref::<BoolValue>() { |