@@ -460,7 +460,7 @@ impl<K, V> NodeRef<marker::Dying, K, V, marker::LeafOrInternal> {
460
460
}
461
461
}
462
462
463
- impl < ' a , K , V , Type > NodeRef < marker:: Mut < ' a > , K , V , Type > {
463
+ impl < ' a , K , V > NodeRef < marker:: Mut < ' a > , K , V , marker :: LeafOrInternal > {
464
464
/// Unsafely asserts to the compiler the static information that this node is a `Leaf`.
465
465
unsafe fn cast_to_leaf_unchecked ( self ) -> NodeRef < marker:: Mut < ' a > , K , V , marker:: Leaf > {
466
466
debug_assert ! ( self . height == 0 ) ;
@@ -472,7 +472,9 @@ impl<'a, K, V, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
472
472
debug_assert ! ( self . height > 0 ) ;
473
473
NodeRef { height : self . height , node : self . node , _marker : PhantomData }
474
474
}
475
+ }
475
476
477
+ impl < ' a , K , V , Type > NodeRef < marker:: Mut < ' a > , K , V , Type > {
476
478
/// Temporarily takes out another, mutable reference to the same node. Beware, as
477
479
/// this method is very dangerous, doubly so since it may not immediately appear
478
480
/// dangerous.
@@ -751,15 +753,17 @@ impl<BorrowType, K, V, NodeType, HandleType>
751
753
}
752
754
}
753
755
754
- impl < ' a , K , V , NodeType , HandleType > Handle < NodeRef < marker:: Mut < ' a > , K , V , NodeType > , HandleType > {
756
+ impl < ' a , K , V , Type > Handle < NodeRef < marker:: Mut < ' a > , K , V , marker :: LeafOrInternal > , Type > {
755
757
/// Unsafely asserts to the compiler the static information that the handle's node is a `Leaf`.
756
758
pub unsafe fn cast_to_leaf_unchecked (
757
759
self ,
758
- ) -> Handle < NodeRef < marker:: Mut < ' a > , K , V , marker:: Leaf > , HandleType > {
760
+ ) -> Handle < NodeRef < marker:: Mut < ' a > , K , V , marker:: Leaf > , Type > {
759
761
let node = unsafe { self . node . cast_to_leaf_unchecked ( ) } ;
760
762
Handle { node, idx : self . idx , _marker : PhantomData }
761
763
}
764
+ }
762
765
766
+ impl < ' a , K , V , NodeType , HandleType > Handle < NodeRef < marker:: Mut < ' a > , K , V , NodeType > , HandleType > {
763
767
/// Temporarily takes out another, mutable handle on the same location. Beware, as
764
768
/// this method is very dangerous, doubly so since it may not immediately appear
765
769
/// dangerous.
@@ -1509,15 +1513,13 @@ impl<BorrowType, K, V> Handle<NodeRef<BorrowType, K, V, marker::Internal>, marke
1509
1513
}
1510
1514
}
1511
1515
1512
- impl < BorrowType , K , V , HandleType >
1513
- Handle < NodeRef < BorrowType , K , V , marker:: LeafOrInternal > , HandleType >
1514
- {
1516
+ impl < BorrowType , K , V , Type > Handle < NodeRef < BorrowType , K , V , marker:: LeafOrInternal > , Type > {
1515
1517
/// Checks whether the underlying node is an `Internal` node or a `Leaf` node.
1516
1518
pub fn force (
1517
1519
self ,
1518
1520
) -> ForceResult <
1519
- Handle < NodeRef < BorrowType , K , V , marker:: Leaf > , HandleType > ,
1520
- Handle < NodeRef < BorrowType , K , V , marker:: Internal > , HandleType > ,
1521
+ Handle < NodeRef < BorrowType , K , V , marker:: Leaf > , Type > ,
1522
+ Handle < NodeRef < BorrowType , K , V , marker:: Internal > , Type > ,
1521
1523
> {
1522
1524
match self . node . force ( ) {
1523
1525
ForceResult :: Leaf ( node) => {
0 commit comments