Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
klauserc
6 days ago
|
parent
|
context
|
favorite
| on:
Perhaps Rust Needs "Defer"
Would `Vec::into_boxed_slice` [1] be the answer here? It gives you a `Box<[Foo]>`, which doesn't have a capacity (it still knows its own length).
1:
https://doc.rust-lang.org/std/vec/struct.Vec.html#method.int...
aapoalas
6 days ago
[–]
Yup, it definitely would.
reply
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
1: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.int...