This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 0227b71
committed
Add guarantee that Vec::default() does not alloc
Currently `Vec::new()` is guaranteed to not allocate until elements are
pushed onto the `Vec`, but such a guarantee is missing for `Vec`'s
implementation of `Default::default`. This adds such a guarantee for
`Vec::default()` to the API reference.1 parent a9bb589 commit 0227b71
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2927 | 2927 | | |
2928 | 2928 | | |
2929 | 2929 | | |
| 2930 | + | |
| 2931 | + | |
2930 | 2932 | | |
2931 | 2933 | | |
2932 | 2934 | | |
| |||
0 commit comments