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

Method mul_op

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

Source from the content-addressed store, hash-verified

111 }
112
113 fn mul_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
114 if let Some(value) = other.as_int() {
115 let interval = self.interval.mul(value)?;
116 return Ok(Box::new(IntervalValue::new(interval)));
117 }
118 Err("Unexpected type to perform `*` with".to_string())
119 }
120
121 fn div_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
122 if let Some(value) = other.as_int() {

Callers

nothing calls this directly

Calls 2

as_intMethod · 0.80
mulMethod · 0.80

Tested by

no test coverage detected