nim-chronos
nim-chronos copied to clipboard
`results.?` compatibity
This PR uses the facilities provided in
https://github.com/status-im/nim-stew/pull/134 to support ?
in async
proc's.
Besides the alternative I proposed here and will test out when I find some time, a cooler solution would be to open an RFC on the Nim specs to allow:
proc hey: string =
template `return`(i: int) = return $i
return 5
to work. It could replace the whole "rewritting return" sheningan, fix the issue with results in a nice generic way, and doesn't seem stupid to me
Do you think it would make sense to open such RFC? (Obviously, it would take a long time, so we'll need another temporary solution anyway)
ci fails are due to nimble, not the changes
https://github.com/arnetheduck/nim-results/pull/37 is one more entry in the ?
compatibility line which works out-of-the-box now that #449 is merged
obsoleted by https://github.com/arnetheduck/nim-results/pull/37