Rollup merge of #61926 - scottmcm:vec-vecdeque, r=Mark-Simulacrum
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 5168f5d220d0b30d322f254f51142931a9054056.~~ ~~(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.
This commit is contained in:
commit
7fc80b6bc6
1 changed files with 6 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue