Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/revlog/manifest.rs @ 52044:78fc666a3e94
rust-files: check for empty manifests caused by narrow
Explanations inline
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 02 Oct 2024 13:39:43 +0200 |
parents | 0ea323b7e3b1 |
children | 039b7caeb4d9 |
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/manifest.rs Wed Oct 02 13:36:51 2024 +0200 +++ b/rust/hg-core/src/revlog/manifest.rs Wed Oct 02 13:39:43 2024 +0200 @@ -87,6 +87,11 @@ } impl Manifest { + /// Return a new empty manifest + pub fn empty() -> Self { + Self { bytes: vec![] } + } + pub fn iter( &self, ) -> impl Iterator<Item = Result<ManifestEntry, HgError>> {