@@ -305,12 +305,6 @@ impl<BorrowType, K, V, Type> NodeRef<BorrowType, K, V, Type> {
305305 self . height
306306 }
307307
308- /// Removes any static information about whether this node is a `Leaf` or an
309- /// `Internal` node.
310- pub fn forget_type ( self ) -> NodeRef < BorrowType , K , V , marker:: LeafOrInternal > {
311- NodeRef { height : self . height , node : self . node , root : self . root , _marker : PhantomData }
312- }
313-
314308 /// Temporarily takes out another, immutable reference to the same node.
315309 fn reborrow ( & self ) -> NodeRef < marker:: Immut < ' _ > , K , V , Type > {
316310 NodeRef { height : self . height , node : self . node , root : self . root , _marker : PhantomData }
@@ -1362,6 +1356,20 @@ unsafe fn move_edges<K, V>(
13621356 }
13631357}
13641358
1359+ impl < BorrowType , K , V > NodeRef < BorrowType , K , V , marker:: Leaf > {
1360+ /// Removes any static information asserting that this node is a `Leaf` node.
1361+ pub fn forget_type ( self ) -> NodeRef < BorrowType , K , V , marker:: LeafOrInternal > {
1362+ NodeRef { height : self . height , node : self . node , root : self . root , _marker : PhantomData }
1363+ }
1364+ }
1365+
1366+ impl < BorrowType , K , V > NodeRef < BorrowType , K , V , marker:: Internal > {
1367+ /// Removes any static information asserting that this node is an `Internal` node.
1368+ pub fn forget_type ( self ) -> NodeRef < BorrowType , K , V , marker:: LeafOrInternal > {
1369+ NodeRef { height : self . height , node : self . node , root : self . root , _marker : PhantomData }
1370+ }
1371+ }
1372+
13651373impl < BorrowType , K , V > Handle < NodeRef < BorrowType , K , V , marker:: Leaf > , marker:: Edge > {
13661374 pub fn forget_node_type (
13671375 self ,
0 commit comments