File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,19 @@ use core::ops::RangeBounds;
6
6
7
7
/// A map which can be iterated in a deterministic order.
8
8
///
9
- /// This would traditionally be accomplished by simply using a `BTreeMap`, however B-Trees
9
+ /// This would traditionally be accomplished by simply using a [ `BTreeMap`] , however B-Trees
10
10
/// generally have very slow lookups. Because we use a nodes+channels map while finding routes
11
11
/// across the network graph, our network graph backing map must be as performant as possible.
12
12
/// However, because peers expect to sync the network graph from us (and we need to support that
13
13
/// without holding a lock on the graph for the duration of the sync or dumping the entire graph
14
14
/// into our outbound message queue), we need an iterable map with a consistent iteration order we
15
15
/// can jump to a starting point on.
16
16
///
17
- /// Thus, we have a custom data structure here - its API mimics that of Rust's `BTreeMap`, but is
17
+ /// Thus, we have a custom data structure here - its API mimics that of Rust's [ `BTreeMap`] , but is
18
18
/// actually backed by a [`HashMap`], with some additional tracking to ensure we can iterate over
19
19
/// keys in the order defined by [`Ord`].
20
+ ///
21
+ /// [`BTreeMap`]: alloc::collections::BTreeMap
20
22
#[ derive( Clone , PartialEq , Eq ) ]
21
23
pub struct IndexedMap < K : Ord , V > {
22
24
map : BTreeMap < K , V > ,
You can’t perform that action at this time.
0 commit comments