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

Function interval_value_or_error_i64

crates/gitql-ast/src/interval.rs:135–140  ·  view source on GitHub ↗
(value: i64)

Source from the content-addressed store, hash-verified

133}
134
135fn interval_value_or_error_i64(value: i64) -> Result<i64, String> {
136 if (-INTERVAL_MAX_VALUE_I..=INTERVAL_MAX_VALUE_I).contains(&value) {
137 return Ok(value);
138 }
139 Err(format!("Interval value out of range {value}"))
140}
141
142fn interval_value_or_error_f64(value: f64) -> Result<f64, String> {
143 if (-INTERVAL_MAX_VALUE_F..=INTERVAL_MAX_VALUE_F).contains(&value) {

Callers 4

addMethod · 0.85
subMethod · 0.85
mulMethod · 0.85
divMethod · 0.85

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…