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

Method mul_op

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

Source from the content-addressed store, hash-verified

68 }
69
70 fn mul_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
71 if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() {
72 let value = self.value * other_int.value;
73 return Ok(Box::new(IntValue::new(value)));
74 }
75 Err("Unexpected type to perform `*` with".to_string())
76 }
77
78 fn div_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
79 if let Some(other_int) = other.as_any().downcast_ref::<IntValue>() {

Callers

nothing calls this directly

Calls 1

as_anyMethod · 0.45

Tested by

no test coverage detected