logoalt Hacker News

glandium • today at 12:19 AM • 0 replies • view on HN

You can mostly write the former in rust: https://rust.godbolt.org/z/5M6nr3dzs

There are caveats, such the function using ? having to return an Option, which can be worked around by using a closure.

I think try blocks will make this slightly easier.