Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/operations/annotate.rs @ 52770:7b4548a075ab
rust: refactor conversions from GraphError
This is in preparation for adding a new kind of GraphError.
author | Mitchell Kember <mkember@janestreet.com> |
---|---|
date | Fri, 07 Feb 2025 16:03:35 -0500 |
parents | 6183949219b2 |
children | 874c64e041b5 |
line wrap: on
line diff
--- a/rust/hg-core/src/operations/annotate.rs Mon Feb 10 18:14:44 2025 +0100 +++ b/rust/hg-core/src/operations/annotate.rs Fri Feb 07 16:03:35 2025 -0500 @@ -514,9 +514,5 @@ /// Converts a [`GraphError`] to an [`HgError`]. fn from_graph_error(err: GraphError) -> HgError { - match err { - GraphError::ParentOutOfRange(revision) => HgError::corrupted(format!( - "parent rev {revision} is out of range" - )), - } + HgError::corrupted(err.to_string()) }