# HG changeset patch # User Simon Sapin # Date 1633259683 -7200 # Node ID 47fabca85457ef4d23e7df98dd17d81c08104d36 # Parent 4d5a13253d34a4c330e7e087e5ee12d249aab2b1 dirstate-v2: Name a constant in the Rust implementation We are about to introduce a Python version of this code that will also need this constant. Differential Revision: https://phab.mercurial-scm.org/D11547 diff -r 4d5a13253d34 -r 47fabca85457 rust/hg-core/src/dirstate_tree/on_disk.rs --- a/rust/hg-core/src/dirstate_tree/on_disk.rs Tue Oct 12 17:57:57 2021 +0200 +++ b/rust/hg-core/src/dirstate_tree/on_disk.rs Sun Oct 03 13:14:43 2021 +0200 @@ -35,12 +35,14 @@ /// `mercurial/dirstateutils/docket.py` const TREE_METADATA_SIZE: usize = 44; +const NODE_SIZE: usize = 43; + /// Make sure that size-affecting changes are made knowingly #[allow(unused)] fn static_assert_size_of() { let _ = std::mem::transmute::; let _ = std::mem::transmute::; - let _ = std::mem::transmute::; + let _ = std::mem::transmute::; } // Must match `HEADER` in `mercurial/dirstateutils/docket.py`