rust-inner-revlog: always inline `get_entry`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 12 Sep 2024 10:09:06 +0200
changeset 51854 5baa52ca4932
parent 51853 4777378fc3bf
child 51855 eb9dea148233
rust-inner-revlog: always inline `get_entry` This is a very hot function.
rust/hg-core/src/revlog/index.rs
--- a/rust/hg-core/src/revlog/index.rs	Thu Sep 12 10:08:45 2024 +0200
+++ b/rust/hg-core/src/revlog/index.rs	Thu Sep 12 10:09:06 2024 +0200
@@ -448,6 +448,7 @@
     ///
     /// The specified revision being of the checked type, it always exists
     /// if it was validated by this index.
+    #[inline(always)]
     pub fn get_entry(&self, rev: Revision) -> Option<IndexEntry> {
         if rev == NULL_REVISION {
             return None;