Skip to content

Commit d3b08ce

Browse files
committed
Document args returned from Vec::into_raw_parts{,_with_alloc}
1 parent ac1fe4c commit d3b08ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

alloc/src/vec/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ impl<T, A: Allocator> Vec<T, A> {
786786
unsafe { Vec { buf: RawVec::from_raw_parts_in(ptr, capacity, alloc), len: length } }
787787
}
788788

789-
/// Decomposes a `Vec<T>` into its raw components.
789+
/// Decomposes a `Vec<T>` into its raw components: `(pointer, length, capacity)`.
790790
///
791791
/// Returns the raw pointer to the underlying data, the length of
792792
/// the vector (in elements), and the allocated capacity of the
@@ -824,7 +824,7 @@ impl<T, A: Allocator> Vec<T, A> {
824824
(me.as_mut_ptr(), me.len(), me.capacity())
825825
}
826826

827-
/// Decomposes a `Vec<T>` into its raw components.
827+
/// Decomposes a `Vec<T>` into its raw components: `(pointer, length, capacity, allocator)`.
828828
///
829829
/// Returns the raw pointer to the underlying data, the length of the vector (in elements),
830830
/// the allocated capacity of the data (in elements), and the allocator. These are the same

0 commit comments

Comments
 (0)