MCPcopy Create free account
hub / github.com/coooodeer/parse-rust / parse_values_equal

Function parse_values_equal

src/parser.rs:415–429  ·  view source on GitHub ↗
(left: &ParseValue, right: &ParseValue)

Source from the content-addressed store, hash-verified

413}
414
415fn parse_values_equal(left: &ParseValue, right: &ParseValue) -> bool {
416 match (left, right) {
417 (ParseValue::Str(a), ParseValue::Str(b)) => a == b,
418 (ParseValue::Int(a), ParseValue::Int(b)) => a == b,
419 (ParseValue::Float(a), ParseValue::Float(b)) => a == b,
420 (ParseValue::Decimal(a), ParseValue::Decimal(b)) => a == b,
421 (ParseValue::Percent(a), ParseValue::Percent(b)) => a == b,
422 (ParseValue::Map(a), ParseValue::Map(b)) => a == b,
423 (
424 ParseValue::DateTime { raw: a, format: af },
425 ParseValue::DateTime { raw: b, format: bf },
426 ) => a == b && af == bf,
427 _ => false,
428 }
429}
430
431fn expand_named_fields(named_fields: HashMap<String, ParseValue>) -> HashMap<String, ParseValue> {
432 let mut result = HashMap::new();

Callers 1

try_evaluate_capturesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected