Skip to content

Commit

Permalink
Merge #653
Browse files Browse the repository at this point in the history
653: Use intra-doc links r=taiki-e a=taiki-e

follow-up #535

Co-authored-by: Taiki Endo <[email protected]>
  • Loading branch information
bors[bot] and taiki-e authored Feb 13, 2021
2 parents 64506d5 + 5cf8791 commit 25f569c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 41 deletions.
2 changes: 0 additions & 2 deletions crossbeam-channel/src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ pub fn at(when: Instant) -> Receiver<Instant> {
/// recv(timeout) -> _ => println!("timed out"),
/// }
/// ```
///
/// [`select!`]: macro.select.html
pub fn never<T>() -> Receiver<T> {
Receiver {
flavor: ReceiverFlavor::Never(flavors::never::Channel::new()),
Expand Down
3 changes: 0 additions & 3 deletions crossbeam-channel/src/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,9 +864,6 @@ impl<'a> Select<'a> {
/// The selected operation must be completed with [`SelectedOperation::send`]
/// or [`SelectedOperation::recv`].
///
/// [`SelectedOperation::send`]: struct.SelectedOperation.html#method.send
/// [`SelectedOperation::recv`]: struct.SelectedOperation.html#method.recv
///
/// # Examples
///
/// ```
Expand Down
24 changes: 11 additions & 13 deletions crossbeam-skiplist/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! let person_ages = SkipMap::new();
//!
//! scope(|s| {
//! // Insert entries into the map from multiple threads.
//! // Insert entries into the map from multiple threads.
//! s.spawn(|_| {
//! person_ages.insert("Spike Garrett", 22);
//! person_ages.insert("Stan Hancock", 47);
Expand Down Expand Up @@ -56,7 +56,7 @@
//! s.spawn(|_| {
//! numbers.remove(&5);
//! });
//!
//!
//! // While the thread above is running, insert a value into the set.
//! numbers.insert(5);
//!
Expand Down Expand Up @@ -153,16 +153,14 @@
//! with good performance characteristics.
//! * [`flurry`](https://docs.rs/flurry) is a Rust port of Java's `ConcurrentHashMap`.
//!
//! [`SkipMap`]: struct.SkipMap.html
//! [`SkipSet`]: struct.SkipSet.html
//! [`insert`]: struct.SkipMap.html#method.insert
//! [`get`]: struct.SkipMap.html#method.get
//! [`Entry`]: map/struct.Entry.html
//! [`insert`]: SkipMap::insert
//! [`get`]: SkipMap::get
//! [`Entry`]: map::Entry
//! [skip lists]: https://en.wikipedia.org/wiki/Skip_list
//! [`crossbeam-epoch`]: https://docs.rs/crossbeam-epoch
//! [`BTreeMap`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html
//! [`BTreeSet`]: https://doc.rust-lang.org/std/collections/struct.BTreeSet.html
//! [`RwLock`]: https://doc.rust-lang.org/std/sync/struct.RwLock.html
//! [`BTreeMap`]: std::collections::BTreeMap
//! [`BTreeSet`]: std::collections::BTreeSet
//! [`RwLock`]: std::sync::RwLock
//!
//! # Examples
//! [`SkipMap`] basic usage:
Expand Down Expand Up @@ -196,7 +194,7 @@
//! for entry in &movie_reviews {
//! let movie = entry.key();
//! let review = entry.value();
//! println!("{}: \"{}\"", movie, review);
//! println!("{}: \"{}\"", movie, review);
//! }
//! ```
//!
Expand Down Expand Up @@ -225,8 +223,8 @@
//! // Iterate over the books in the set.
//! // Values are returned in lexicographical order.
//! for entry in &books {
//! let book = entry.value();
//! println!("{}", book);
//! let book = entry.value();
//! println!("{}", book);
//! }
//! ```

Expand Down
26 changes: 3 additions & 23 deletions crossbeam-skiplist/src/map.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! An ordered map based on a lock-free skip list. See [`SkipMap`](struct.SkipMap.html).
//! An ordered map based on a lock-free skip list. See [`SkipMap`].

use std::borrow::Borrow;
use std::fmt;
Expand All @@ -15,7 +15,7 @@ use crate::epoch;
/// This is an alternative to [`BTreeMap`] which supports
/// concurrent access across multiple threads.
///
/// [`BTreeMap`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html
/// [`BTreeMap`]: std::collections::BTreeMap
pub struct SkipMap<K, V> {
inner: base::SkipList<K, V>,
}
Expand Down Expand Up @@ -77,8 +77,6 @@ where
/// This function returns an [`Entry`] which
/// can be used to access the key's associated value.
///
/// [`Entry`]: map/struct.Entry.html
///
/// # Example
/// ```
/// use crossbeam_skiplist::SkipMap;
Expand All @@ -99,8 +97,6 @@ where
/// This function returns an [`Entry`] which
/// can be used to access the key's associated value.
///
/// [`Entry`]: map/struct.Entry.html
///
/// # Example
/// ```
/// use crossbeam_skiplist::SkipMap;
Expand Down Expand Up @@ -142,8 +138,6 @@ where
/// This function returns an [`Entry`] which
/// can be used to access the key's associated value.
///
/// [`Entry`]: map/struct.Entry.html
///
/// # Example
/// ```
/// use crossbeam_skiplist::SkipMap;
Expand All @@ -170,8 +164,6 @@ where
/// This function returns an [`Entry`] which
/// can be used to access the key's associated value.
///
/// [`Entry`]: map/struct.Entry.html
///
/// # Example
/// ```
/// use crossbeam_skiplist::SkipMap;
Expand Down Expand Up @@ -207,8 +199,6 @@ where
/// This function returns an [`Entry`] which
/// can be used to access the key's associated value.
///
/// [`Entry`]: map/struct.Entry.html
///
/// # Example
/// ```
/// use crossbeam_skiplist::SkipMap;
Expand Down Expand Up @@ -239,8 +229,6 @@ where
/// This function returns an [`Entry`] which
/// can be used to access the key's associated value.
///
/// [`Entry`]: map/struct.Entry.html
///
/// # Example
/// ```
/// use crossbeam_skiplist::SkipMap;
Expand All @@ -264,8 +252,6 @@ where
/// This iterator returns [`Entry`]s which
/// can be used to access keys and their associated values.
///
/// [`Entry`]: map/struct.Entry.html
///
/// # Examples
/// ```
/// use crossbeam_skiplist::SkipMap;
Expand Down Expand Up @@ -293,8 +279,6 @@ where
/// This iterator returns [`Entry`]s which
/// can be used to access keys and their associated values.
///
/// [`Entry`]: map/struct.Entry.html
///
/// # Example
/// ```
/// use crossbeam_skiplist::SkipMap;
Expand All @@ -308,7 +292,7 @@ where
/// for entry in numbers.range(5..=8) {
/// let number = entry.key();
/// let number_str = entry.value();
/// println!("{} is {}", number, number_str);
/// println!("{} is {}", number, number_str);
/// }
/// ```
pub fn range<Q, R>(&self, range: R) -> Range<'_, Q, R, K, V>
Expand Down Expand Up @@ -336,8 +320,6 @@ where
/// This function returns an [`Entry`] which
/// can be used to access the inserted key's associated value.
///
/// [`Entry`]: map/struct.Entry.html
///
/// # Example
/// ```
/// use crossbeam_skiplist::SkipMap;
Expand All @@ -360,8 +342,6 @@ where
/// This function returns an [`Entry`] which
/// can be used to access the removed key's associated value.
///
/// [`Entry`]: map/struct.Entry.html
///
/// # Example
/// ```
/// use crossbeam_skiplist::SkipMap;
Expand Down

0 comments on commit 25f569c

Please sign in to comment.