This removes some repetition, and will avoid additional repetition
in the next commit.
Details
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
rust/rhg/src/main.rs | ||
---|---|---|
29 | This should be a fallback to Python (if the "no fallback" config option is not set, when we're at that point) instead of a panic. Maybe this handling can be done in the same follow-up patch as the catch_unwind one from the previous patch? |
rust/rhg/src/main.rs | ||
---|---|---|
29 | My understanding of SubcommandRequired is that it makes get_matches_safe return an error (so this code is not even reached) in all cases that would otherwise return None here. Is that not how it works? |
rust/rhg/src/main.rs | ||
---|---|---|
29 | Ha, it does, but we also print an error to stderr at line 24 which confused me, when it should go to log::debug to grep for the fallback reason and not print anything to the user. |
This should be a fallback to Python (if the "no fallback" config option is not set, when we're at that point) instead of a panic. Maybe this handling can be done in the same follow-up patch as the catch_unwind one from the previous patch?
Note that the previous behavior of exiting is not valid either, hence why I propose a follow-up.