diff rust/hg-core/src/revlog/nodemap_docket.rs @ 51864:db7dbe6f7bb2

rust: add Vfs trait This will allow for the use of multiple vfs like in the Python implementation, as well as hiding the details of the upcoming Python vfs wrapper to hg-core.
author Rapha?l Gom?s <rgomes@octobus.net>
date Wed, 19 Jun 2024 14:49:35 +0200
parents 532e74ad3ff6
children
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/nodemap_docket.rs	Wed Jun 19 12:49:26 2024 +0200
+++ b/rust/hg-core/src/revlog/nodemap_docket.rs	Wed Jun 19 14:49:35 2024 +0200
@@ -3,7 +3,7 @@
 use memmap2::Mmap;
 use std::path::{Path, PathBuf};
 
-use crate::vfs::Vfs;
+use crate::vfs::VfsImpl;
 
 const ONDISK_VERSION: u8 = 1;
 
@@ -33,7 +33,7 @@
     /// * The docket file points to a missing (likely deleted) data file (this
     ///   can happen in a rare race condition).
     pub fn read_from_file(
-        store_vfs: &Vfs,
+        store_vfs: &VfsImpl,
         index_path: &Path,
     ) -> Result<Option<(Self, Mmap)>, HgError> {
         let docket_path = index_path.with_extension("n");