MCPcopy Create free account
hub / github.com/hashintel/hash / decode_empty_buffer

Function decode_empty_buffer

libs/@local/codec/src/bytes.rs:387–397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

385
386 #[test]
387 fn decode_empty_buffer() {
388 // Setup
389 let mut decoder = JsonLinesDecoder::<TestItem>::new();
390 let mut buffer = BytesMut::new();
391
392 // Decode should return None for empty buffer
393 let result = decoder
394 .decode(&mut buffer)
395 .expect("should handle empty buffer without error");
396 assert!(result.is_none(), "Should return None for empty buffer");
397 }
398
399 #[test]
400 fn decode_eof_with_partial_data() {

Callers

nothing calls this directly

Calls 2

expectMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected