When you write functions that return Result or Option, it's very common to write out full expression first and then wrap it in Ok($expr) and alike. It would be great to have postfix templates for these operations.
Specifically:
$expr.ok<caret> expand to Ok($expr)$expr.err<caret> expand to Err($expr)$expr.some<caret> expand to Some($expr)$expr.none<caret> expand to None($expr)$expr.none
expand to None($expr)
Probably, did you mean something else? Option::None doesn't have any fields
@Undin Oh, right, I didn't think about it 馃槃 nevermind that case then.
This seems like a pretty easy task, so I am gonna give it a shot. I wanted to start contrubuting at some point anyway ;)
Most helpful comment
This seems like a pretty easy task, so I am gonna give it a shot. I wanted to start contrubuting at some point anyway ;)