Fix some doc link (#10329)

* fix some doc link

* fmt
This commit is contained in:
Guillaume Thiolliere
2021-11-22 19:48:53 +09:00
committed by GitHub
parent cac9d85cb3
commit fcfb766366
25 changed files with 52 additions and 46 deletions
+6 -5
View File
@@ -19,11 +19,11 @@
//!
//! A semi-sorted list, where items hold an `AccountId` based on some `VoteWeight`. The `AccountId`
//! (`id` for short) might be synonym to a `voter` or `nominator` in some context, and `VoteWeight`
//! signifies the chance of each id being included in the final [`VoteWeightProvider::iter`].
//! signifies the chance of each id being included in the final [`SortedListProvider::iter`].
//!
//! It implements [`sp_election_provider_support::SortedListProvider`] to provide a semi-sorted list
//! of accounts to another pallet. It needs some other pallet to give it some information about the
//! weights of accounts via [`sp_election_provider_support::VoteWeightProvider`].
//! It implements [`frame_election_provider_support::SortedListProvider`] to provide a semi-sorted
//! list of accounts to another pallet. It needs some other pallet to give it some information about
//! the weights of accounts via [`frame_election_provider_support::VoteWeightProvider`].
//!
//! This pallet is not configurable at genesis. Whoever uses it should call appropriate functions of
//! the `SortedListProvider` (e.g. `on_insert`, or `regenerate`) at their genesis.
@@ -38,7 +38,8 @@
//!
//! # Details
//!
//! - items are kept in bags, which are delineated by their range of weight (See [`BagThresholds`]).
//! - items are kept in bags, which are delineated by their range of weight (See
//! [`Config::BagThresholds`]).
//! - for iteration, bags are chained together from highest to lowest and elements within the bag
//! are iterated from head to tail.
//! - items within a bag are iterated in order of insertion. Thus removing an item and re-inserting
+3 -3
View File
@@ -17,8 +17,8 @@
//! Implementation of a "bags list": a semi-sorted list where ordering granularity is dictated by
//! configurable thresholds that delineate the boundaries of bags. It uses a pattern of composite
//! data structures, where multiple storage items are masked by one outer API. See [`ListNodes`],
//! [`ListBags`] for more information.
//! data structures, where multiple storage items are masked by one outer API. See
//! [`crate::ListNodes`], [`crate::ListBags`] for more information.
//!
//! The outer API of this module is the [`List`] struct. It wraps all acceptable operations on top
//! of the aggregate linked list. All operations with the bags list should happen through this
@@ -460,7 +460,7 @@ impl<T: Config> List<T> {
}
}
/// A Bag is a doubly-linked list of ids, where each id is mapped to a [`ListNode`].
/// A Bag is a doubly-linked list of ids, where each id is mapped to a [`Node`].
///
/// Note that we maintain both head and tail pointers. While it would be possible to get away with
/// maintaining only a head pointer and cons-ing elements onto the front of the list, it's more