Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
52769:b3349f6cded9 | 52770:7b4548a075ab |
---|---|
512 Ok(linkrev) | 512 Ok(linkrev) |
513 } | 513 } |
514 | 514 |
515 /// Converts a [`GraphError`] to an [`HgError`]. | 515 /// Converts a [`GraphError`] to an [`HgError`]. |
516 fn from_graph_error(err: GraphError) -> HgError { | 516 fn from_graph_error(err: GraphError) -> HgError { |
517 match err { | 517 HgError::corrupted(err.to_string()) |
518 GraphError::ParentOutOfRange(revision) => HgError::corrupted(format!( | 518 } |
519 "parent rev {revision} is out of range" | |
520 )), | |
521 } | |
522 } |