Add @impl or_none to try_scan! (#28) - #29
Conversation
|
Cool! Please also add a test to our test suite showing a use of it |
|
I added a test, and also documented this new feature. On another note, the following two macro variants seem to be more of an implementation detail than a part of the public API (@question_mark: $($e:tt)+) => { ... };
(@unwrap: $($e:tt)+) => { ... };Do you agree that these two macro variants should be removed from the docs? |
|
All of the |
|
For example: the |
|
It is a very convenient feature to be able to choose how errors will be handled. I'd personally pledge for exposing the If you disagree, I suppose a wrapper macro is also a viable option. |
|
hmm... I like that. So we get rid of the |
|
We should probably rename the modes to something more user friendly then. What do you think about the following list?
|
|
at that point we could also start supporting these flags directly on |
|
Those look like good ideas. Let me add my own:
If I had to choose one each, hmm... I think I would choose @Panic + @return_err + @return_none. Those are very clear names because they describe exactly what is gonna happen on failures. |
|
I'm not sold on the capitalization of |
|
Oh I'm only seeing now that GitHub capitalized my |
This is my attempt at implementing #28