--- a/rust/hg-cpython/src/dirstate/item.rs Wed Sep 22 11:33:29 2021 +0200
+++ b/rust/hg-cpython/src/dirstate/item.rs Wed Sep 22 18:21:58 2021 +0200
@@ -180,6 +180,10 @@
Ok(DirstateItem::create_instance(py, Cell::new(entry))?.into_object())
}
+ pub fn get_entry(&self, py: Python<'_>) -> DirstateEntry {
+ self.entry(py).get()
+ }
+
// TODO: Use https://doc.rust-lang.org/std/cell/struct.Cell.html#method.update instead when it’s stable
pub fn update(&self, py: Python<'_>, f: impl FnOnce(&mut DirstateEntry)) {
let mut entry = self.entry(py).get();