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

Method div_op

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

Source from the content-addressed store, hash-verified

119 }
120
121 fn div_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
122 if let Some(value) = other.as_int() {
123 let interval = self.interval.div(value)?;
124 return Ok(Box::new(IntervalValue::new(interval)));
125 }
126 Err("Unexpected type to perform `/` with".to_string())
127 }
128}

Callers

nothing calls this directly

Calls 2

as_intMethod · 0.80
divMethod · 0.80

Tested by

no test coverage detected