1
Fork 0

Rearrange Vec::from_raw_parts{,_in} doc argument order to match code argument order

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-02-26 19:22:34 +00:00
parent b79db437dc
commit a1b93e8fed
No known key found for this signature in database
GPG key ID: 95DDEBD74A1DC2C0

View file

@ -481,7 +481,7 @@ impl<T> Vec<T> {
Self::with_capacity_in(capacity, Global) Self::with_capacity_in(capacity, Global)
} }
/// Creates a `Vec<T>` directly from a pointer, a capacity, and a length. /// Creates a `Vec<T>` directly from a pointer, a length, and a capacity.
/// ///
/// # Safety /// # Safety
/// ///
@ -672,7 +672,7 @@ impl<T, A: Allocator> Vec<T, A> {
Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 }
} }
/// Creates a `Vec<T, A>` directly from a pointer, a capacity, a length, /// Creates a `Vec<T, A>` directly from a pointer, a length, a capacity,
/// and an allocator. /// and an allocator.
/// ///
/// # Safety /// # Safety