diff rust/hg-core/src/revlog/index.rs @ 51257:e74dd6d73cb5

rust-index: allow inlining `parents` across crates
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 23 Nov 2023 18:48:07 +0100
parents eb676c35a29b
children ed6683d4cb29
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/index.rs	Thu Nov 23 18:47:42 2023 +0100
+++ b/rust/hg-core/src/revlog/index.rs	Thu Nov 23 18:48:07 2023 +0100
@@ -280,6 +280,7 @@
 }
 
 impl Graph for Index {
+    #[inline(always)]
     fn parents(&self, rev: Revision) -> Result<[Revision; 2], GraphError> {
         let err = || GraphError::ParentOutOfRange(rev);
         match self.get_entry(rev) {