vcombey / fallible_collections

impl fallible collections in rust, quite as describe in RFC 2116
Apache License 2.0
31 stars 14 forks source link

Add a way to allocate huge array in Box without creating it on stack first #27

Open singalen opened 2 years ago

singalen commented 2 years ago

Box<huge array> has a known problem: it creates the value on the stack first.

try_new(t: T) also need to consume the value from somewhere - and that would be from stack.

Is it possible to add an API to create an uninitialized array in Box, and not allocate its value on stack first?

Thank you!