MCPcopy Create free account
hub / github.com/apache/avro-rs / test_decode_map_without_size

Function test_decode_map_without_size

avro/src/decode.rs:392–400  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

390 index,
391 num_variants: variants.len(),
392 })?;
393 let value = decode_internal(variant, names, enclosing_namespace, reader, ctx)?;
394 Ok(Value::Union(index as u32, Box::new(value)))
395 }
396 Schema::Record(RecordSchema { name, fields, .. }) => {
397 let fully_qualified_name = name.fully_qualified_name(enclosing_namespace);
398 ctx.debit_items::<(String, Value)>(fields.len())?;
399 // Benchmarks indicate ~10% improvement using this method.
400 let mut items = Vec::with_capacity(fields.len());
401 for field in fields {
402 ctx.debit_bytes(field.name.len())?;
403 // TODO: This clone is also expensive. See if we can do away with it...

Callers

nothing calls this directly

Calls 2

decodeFunction · 0.85
buildMethod · 0.80

Tested by

no test coverage detected