diff rust/hg-core/src/revlog/manifest.rs @ 47963: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 d44740725b95
children 796206e74b10
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/manifest.rs	Mon Sep 13 17:23:42 2021 +0200
+++ b/rust/hg-core/src/revlog/manifest.rs	Mon Sep 13 18:02:45 2021 +0200
@@ -1,3 +1,4 @@
+use crate::errors::HgError;
 use crate::repo::Repo;
 use crate::revlog::revlog::{Revlog, RevlogError};
 use crate::revlog::NodePrefix;
@@ -12,7 +13,7 @@
 
 impl Manifestlog {
     /// Open the `manifest` 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, "00manifest.i", None)?;
         Ok(Self { revlog })
     }