Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG7954ee2d7cf7: rhg: propogate error coming from HgError::Abort to CommandError
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
| rust/rhg/src/error.rs | ||
|---|---|---|
| 134–135 | I believe this case is unnecessary since it is already handled in impl From<HgError> for CommandError | |
| 137 | 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