Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG7954ee2d7cf7: rhg: propogate error coming from HgError::Abort to CommandError
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
rust/rhg/src/error.rs | ||
---|---|---|
131–133 | I believe this case is unnecessary since it is already handled in impl From<HgError> for CommandError | |
134 | This change looks like a bug. Previously this line was calling into HgError::into which calls impl From<HgError> for CommandError, but now this it calls ConfigError::into such that impl From<ConfigError> for CommandError ends up recursively calling itself until the stack overflows. The standard library defines this blanket impl to connect the From and Into traits: impl<T, U> Into<U> for T where U: From<T>, { fn into(self) -> U { U::from(self) } } |
I believe this case is unnecessary since it is already handled in impl From<HgError> for CommandError