MCPcopy Create free account
hub / github.com/apache/arrow-rs / from_iter

Function from_iter

arrow-buffer/src/buffer/mutable.rs:1420–1424  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1418
1419 #[test]
1420 fn from_iter() {
1421 let buffer = [1u16, 2, 3, 4].into_iter().collect::<MutableBuffer>();
1422 assert_eq!(buffer.len(), 4 * mem::size_of::<u16>());
1423 assert_eq!(buffer.as_slice(), &[1, 0, 2, 0, 3, 0, 4, 0]);
1424 }
1425
1426 #[test]
1427 #[should_panic(expected = "failed to create layout for MutableBuffer: LayoutError")]

Callers 12

test_basicFunction · 0.70
test_unalignedFunction · 0.70
test_length_overflowFunction · 0.70
test_start_overflowFunction · 0.70
test_end_overflowFunction · 0.70
from_iterMethod · 0.70
test_from_iter_overflowFunction · 0.70
test_strong_countFunction · 0.70
from_iterMethod · 0.70

Calls 1

into_iterMethod · 0.45

Tested by

no test coverage detected