Skip to content

Commit

Permalink
Rollup merge of rust-lang#61926 - scottmcm:vec-vecdeque, r=Mark-Simul…
Browse files Browse the repository at this point in the history
…acrum

Fix hyperlinks in From impls between Vec and VecDeque

I'd been trying to link them, but apparently actually just added brackets: <https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#impl-From%3CVec%3CT%3E%3E>

~~This reverts commit 5168f5d.~~

~~(I'd previously tried to make relative links, but those failed linkcheck because the types are exported at different levels.  So just skip the links -- they're already linked in the function signature anyway.)~~

This makes the links now work.
  • Loading branch information
Mark-Simulacrum committed Jul 18, 2019
2 parents 21d5b8b + 38d4c1b commit 7fc80b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/liballoc/collections/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2721,6 +2721,9 @@ impl<T: fmt::Debug> fmt::Debug for VecDeque<T> {
impl<T> From<Vec<T>> for VecDeque<T> {
/// Turn a [`Vec<T>`] into a [`VecDeque<T>`].
///
/// [`Vec<T>`]: crate::vec::Vec
/// [`VecDeque<T>`]: crate::collections::VecDeque
///
/// This avoids reallocating where possible, but the conditions for that are
/// strict, and subject to change, and so shouldn't be relied upon unless the
/// `Vec<T>` came from `From<VecDeque<T>>` and hasn't been reallocated.
Expand Down Expand Up @@ -2752,6 +2755,9 @@ impl<T> From<Vec<T>> for VecDeque<T> {
impl<T> From<VecDeque<T>> for Vec<T> {
/// Turn a [`VecDeque<T>`] into a [`Vec<T>`].
///
/// [`Vec<T>`]: crate::vec::Vec
/// [`VecDeque<T>`]: crate::collections::VecDeque
///
/// This never needs to re-allocate, but does need to do O(n) data movement if
/// the circular buffer doesn't happen to be at the beginning of the allocation.
///
Expand Down

0 comments on commit 7fc80b6

Please sign in to comment.