Make `Vec::new` public in vec-alloc.md (#336)

pull/341/head
Kirin 3 years ago committed by GitHub
parent 98a2ca0eef
commit 78da21c40b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,7 +22,7 @@ So:
use std::mem;
impl<T> Vec<T> {
fn new() -> Self {
pub fn new() -> Self {
assert!(mem::size_of::<T>() != 0, "We're not ready to handle ZSTs");
Vec {
ptr: NonNull::dangling(),

Loading…
Cancel
Save