MCPcopy Create free account
hub / github.com/influxdata/influxdb / empty_slice

Function empty_slice

core/linear_buffer/src/linear_buffer.rs:367–373  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

365
366 #[test]
367 fn empty_slice() {
368 let mut buffer = LinearBuffer::new(3);
369 buffer.append(b"foo");
370
371 let bytes = buffer.slice_initialized_part(0..0);
372 assert_eq!(bytes.as_ref(), b"");
373 }
374
375 #[test]
376 fn slices_are_zero_copy() {

Callers

nothing calls this directly

Calls 2

appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…