Mercurial > public > mercurial-scm > hg
diff rust/hg-pyo3/src/revlog/mod.rs @ 52798:88d62995a65b
rust-pyo3-revlog: constant properties
That was really easy. In truth, the rust-cpython version was probably
also simplifiable, although there were corner cases in conversions
that gave us the habit of doing them ourselves.
The value of `_index_is_rust` is puzzling, let's hope it will not
stay long.
author | Georges Racinet <georges.racinet@cloudcrane.io> |
---|---|
date | Mon, 23 Dec 2024 20:06:56 +0100 |
parents | f76911bfbfb1 |
children | 798355e46d03 |
line wrap: on
line diff
--- a/rust/hg-pyo3/src/revlog/mod.rs Mon Dec 23 19:45:14 2024 +0100 +++ b/rust/hg-pyo3/src/revlog/mod.rs Mon Dec 23 20:06:56 2024 +0100 @@ -480,6 +480,21 @@ } }) } + + #[getter] + fn _index_entry_size(&self) -> usize { + INDEX_ENTRY_SIZE + } + + #[getter] + fn _index_rust_ext_compat(&self) -> i32 { + 1 + } + + #[getter] + fn _index_is_rust(&self) -> bool { + true + } } impl InnerRevlog {