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

Method eq_op

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

Source from the content-addressed store, hash-verified

47 }
48
49 fn eq_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
50 if let Some(other_interval) = other.as_any().downcast_ref::<IntervalValue>() {
51 let is_equals = self.interval == other_interval.interval;
52 return Ok(Box::new(BoolValue::new(is_equals)));
53 }
54 Err("Unexpected type to perform `=` with".to_string())
55 }
56
57 fn bang_eq_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
58 if let Some(other_interval) = other.as_any().downcast_ref::<IntervalValue>() {

Callers

nothing calls this directly

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected