diff options
Diffstat (limited to 'src/liballoc/collections/btree/node.rs')
| -rw-r--r-- | src/liballoc/collections/btree/node.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs index 11c14299573..bc4e2711670 100644 --- a/src/liballoc/collections/btree/node.rs +++ b/src/liballoc/collections/btree/node.rs @@ -723,6 +723,11 @@ impl<Node, Type> Handle<Node, Type> { pub fn into_node(self) -> Node { self.node } + + /// Returns the position of this handle in the node. + pub fn idx(&self) -> usize { + self.idx + } } impl<BorrowType, K, V, NodeType> Handle<NodeRef<BorrowType, K, V, NodeType>, marker::KV> { |
