Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
CrendKing
on Dec 12, 2024
|
parent
|
context
|
favorite
| on:
The humble for loop in Rust
Maybe I'm dumb, but I can't see how the code in the "Errors and map" section can compile. "transform_list" returns a Result<>, yet "result" is just a Vec. I thought you always need to wrap it with Ok()? Is that a new nightly feature?
orf
on Dec 12, 2024
|
next
[–]
No, it seems like an oversight in the code sample. It should be wrapped in Ok()
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: