Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
scottlamb
on Sept 5, 2021
|
parent
|
context
|
favorite
| on:
Fast Rust Builds
You can chain calls in Rust. If read_to_end were written to allocate and return a fresh Vec, you could do this:
File::open(path)?.read_to_end()
but instead read_to_end is written to take a presupplied Vec so the caller has the option to reduce allocations.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: