@@ -461,7 +461,7 @@ impl<K, V> NodeRef<marker::Dying, K, V, marker::LeafOrInternal> {
461
461
}
462
462
}
463
463
464
- impl < ' a , K , V , Type > NodeRef < marker:: Mut < ' a > , K , V , Type > {
464
+ impl < ' a , K , V > NodeRef < marker:: Mut < ' a > , K , V , marker :: LeafOrInternal > {
465
465
/// Unsafely asserts to the compiler the static information that this node is a `Leaf`.
466
466
unsafe fn cast_to_leaf_unchecked ( self ) -> NodeRef < marker:: Mut < ' a > , K , V , marker:: Leaf > {
467
467
debug_assert ! ( self . height == 0 ) ;
@@ -473,7 +473,9 @@ impl<'a, K, V, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
473
473
debug_assert ! ( self . height > 0 ) ;
474
474
NodeRef { height : self . height , node : self . node , _marker : PhantomData }
475
475
}
476
+ }
476
477
478
+ impl < ' a , K , V , Type > NodeRef < marker:: Mut < ' a > , K , V , Type > {
477
479
/// Temporarily takes out another, mutable reference to the same node. Beware, as
478
480
/// this method is very dangerous, doubly so since it may not immediately appear
479
481
/// dangerous.
@@ -761,15 +763,17 @@ impl<BorrowType, K, V, NodeType, HandleType>
761
763
}
762
764
}
763
765
764
- impl < ' a , K , V , NodeType , HandleType > Handle < NodeRef < marker:: Mut < ' a > , K , V , NodeType > , HandleType > {
766
+ impl < ' a , K , V , Type > Handle < NodeRef < marker:: Mut < ' a > , K , V , marker :: LeafOrInternal > , Type > {
765
767
/// Unsafely asserts to the compiler the static information that the handle's node is a `Leaf`.
766
768
pub unsafe fn cast_to_leaf_unchecked (
767
769
self ,
768
- ) -> Handle < NodeRef < marker:: Mut < ' a > , K , V , marker:: Leaf > , HandleType > {
770
+ ) -> Handle < NodeRef < marker:: Mut < ' a > , K , V , marker:: Leaf > , Type > {
769
771
let node = unsafe { self . node . cast_to_leaf_unchecked ( ) } ;
770
772
Handle { node, idx : self . idx , _marker : PhantomData }
771
773
}
774
+ }
772
775
776
+ impl < ' a , K , V , NodeType , HandleType > Handle < NodeRef < marker:: Mut < ' a > , K , V , NodeType > , HandleType > {
773
777
/// Temporarily takes out another, mutable handle on the same location. Beware, as
774
778
/// this method is very dangerous, doubly so since it may not immediately appear
775
779
/// dangerous.
@@ -1519,15 +1523,13 @@ impl<BorrowType, K, V> Handle<NodeRef<BorrowType, K, V, marker::Internal>, marke
1519
1523
}
1520
1524
}
1521
1525
1522
- impl < BorrowType , K , V , HandleType >
1523
- Handle < NodeRef < BorrowType , K , V , marker:: LeafOrInternal > , HandleType >
1524
- {
1526
+ impl < BorrowType , K , V , Type > Handle < NodeRef < BorrowType , K , V , marker:: LeafOrInternal > , Type > {
1525
1527
/// Checks whether the underlying node is an `Internal` node or a `Leaf` node.
1526
1528
pub fn force (
1527
1529
self ,
1528
1530
) -> ForceResult <
1529
- Handle < NodeRef < BorrowType , K , V , marker:: Leaf > , HandleType > ,
1530
- Handle < NodeRef < BorrowType , K , V , marker:: Internal > , HandleType > ,
1531
+ Handle < NodeRef < BorrowType , K , V , marker:: Leaf > , Type > ,
1532
+ Handle < NodeRef < BorrowType , K , V , marker:: Internal > , Type > ,
1531
1533
> {
1532
1534
match self . node . force ( ) {
1533
1535
ForceResult :: Leaf ( node) => {
0 commit comments