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

Method contains_op

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

Source from the content-addressed store, hash-verified

152 }
153
154 fn contains_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
155 for value in self.values.iter() {
156 if value.equals(other) {
157 return Ok(Box::new(BoolValue { value: true }));
158 }
159 }
160
161 Ok(Box::new(BoolValue::new_false()))
162 }
163}

Callers

nothing calls this directly

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected