comparison rust/hg-cpython/src/revlog.rs @ 51258:8b89f7cc953a

rust-index: allow inlining VCSGraph parents across crates
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 14 Dec 2023 11:52:05 +0100
parents 24d3298189d7
children 9088c6d65ef6
comparison
equal deleted inserted replaced
51257:e74dd6d73cb5 51258:8b89f7cc953a
51 Self { inner: self.inner } 51 Self { inner: self.inner }
52 } 52 }
53 } 53 }
54 54
55 impl Graph for PySharedIndex { 55 impl Graph for PySharedIndex {
56 #[inline(always)]
56 fn parents(&self, rev: Revision) -> Result<[Revision; 2], hg::GraphError> { 57 fn parents(&self, rev: Revision) -> Result<[Revision; 2], hg::GraphError> {
57 self.inner.parents(rev) 58 self.inner.parents(rev)
58 } 59 }
59 } 60 }
60 61
61 impl VCSGraph for PySharedIndex { 62 impl VCSGraph for PySharedIndex {
63 #[inline(always)]
62 fn parents( 64 fn parents(
63 &self, 65 &self,
64 rev: BaseRevision, 66 rev: BaseRevision,
65 ) -> Result<vcsgraph::graph::Parents, vcsgraph::graph::GraphReadError> 67 ) -> Result<vcsgraph::graph::Parents, vcsgraph::graph::GraphReadError>
66 { 68 {