diff rust/hg-core/src/dirstate_tree/on_disk.rs @ 48194:1000db4a71f1

dirstate-v2: Store unsigned integers inside DirstateEntry The negative marker values are not used anymore. Differential Revision: https://phab.mercurial-scm.org/D11634
author Simon Sapin <simon.sapin@octobus.net>
date Mon, 11 Oct 2021 18:37:21 +0200
parents 320de901896a
children 4d5a13253d34
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/on_disk.rs	Tue Oct 12 16:38:13 2021 +0200
+++ b/rust/hg-core/src/dirstate_tree/on_disk.rs	Mon Oct 11 18:37:21 2021 +0200
@@ -11,7 +11,7 @@
 use crate::DirstateError;
 use crate::DirstateParents;
 use bitflags::bitflags;
-use bytes_cast::unaligned::{I32Be, U16Be, U32Be};
+use bytes_cast::unaligned::{U16Be, U32Be};
 use bytes_cast::BytesCast;
 use format_bytes::format_bytes;
 use std::borrow::Cow;
@@ -113,9 +113,9 @@
 #[derive(BytesCast, Copy, Clone, Debug)]
 #[repr(C)]
 struct Entry {
-    mode: I32Be,
-    size: I32Be,
-    mtime: I32Be,
+    mode: U32Be,
+    size: U32Be,
+    mtime: U32Be,
 }
 
 /// Duration since the Unix epoch