@@ -305,12 +305,6 @@ impl<BorrowType, K, V, Type> NodeRef<BorrowType, K, V, Type> {
305
305
self . height
306
306
}
307
307
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
-
314
308
/// Temporarily takes out another, immutable reference to the same node.
315
309
fn reborrow ( & self ) -> NodeRef < marker:: Immut < ' _ > , K , V , Type > {
316
310
NodeRef { height : self . height , node : self . node , root : self . root , _marker : PhantomData }
@@ -1362,6 +1356,20 @@ unsafe fn move_edges<K, V>(
1362
1356
}
1363
1357
}
1364
1358
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
+
1365
1373
impl < BorrowType , K , V > Handle < NodeRef < BorrowType , K , V , marker:: Leaf > , marker:: Edge > {
1366
1374
pub fn forget_node_type (
1367
1375
self ,
0 commit comments