Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-core/src/revlog/changelog.rs @ 47991:001d747c2baf
rust: Return HgError instead of RevlogError in revlog constructors
This leaves fewer cases for callers to handle, as RevlogError is more general
Differential Revision: https://phab.mercurial-scm.org/D11410
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 13 Sep 2021 18:02:45 +0200 |
parents | b1f2c2b336ec |
children | 796206e74b10 |
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/changelog.rs Mon Sep 13 17:23:42 2021 +0200 +++ b/rust/hg-core/src/revlog/changelog.rs Mon Sep 13 18:02:45 2021 +0200 @@ -12,7 +12,7 @@ impl Changelog { /// Open the `changelog` of a repository given by its root. - pub fn open(repo: &Repo) -> Result<Self, RevlogError> { + pub fn open(repo: &Repo) -> Result<Self, HgError> { let revlog = Revlog::open(repo, "00changelog.i", None)?; Ok(Self { revlog }) }