MCPcopy Create free account
hub / github.com/apache/datafusion / box_map_elements_reuses_allocation

Function box_map_elements_reuses_allocation

datafusion/common/src/tree_node.rs:2455–2461  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2453
2454 #[test]
2455 fn box_map_elements_reuses_allocation() {
2456 let boxed = Box::new(TestTreeNode::new_leaf(42i32));
2457 let before: *const TestTreeNode<i32> = &*boxed;
2458 let out = boxed.map_elements(|n| Ok(Transformed::no(n))).unwrap();
2459 let after: *const TestTreeNode<i32> = &*out.data;
2460 assert_eq!(after, before);
2461 }
2462
2463 #[test]
2464 fn arc_map_elements_reuses_allocation_when_unique() {

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
map_elementsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…