MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / xor_op

Method xor_op

crates/gitql-core/src/values/integer.rs:124–130  ·  view source on GitHub ↗
(&self, other: &Box<dyn Value>)

Source from the content-addressed store, hash-verified

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>() {
126 let value = self.value ^ other_int.value;
127 return Ok(Box::new(IntValue::new(value)));
128 }
129 Err("Unexpected type to perform `^` with".to_string())
130 }
131
132 fn shl_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
133 if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() {

Callers 1

evaluate_bitwiseFunction · 0.45

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected