Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/revlog/changelog.rs @ 47967:6c653d9d41b8
rust: Make private the `index` field of the `Revlog` struct
To replace the previous use of this field from another module, add a
`node_from_rev` method. This is the same method that already existed on
`Changelog`.
Differential Revision: https://phab.mercurial-scm.org/D11414
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Tue, 14 Sep 2021 18:07:11 +0200 |
parents | 796206e74b10 |
children | 6f579618ea7b |
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/changelog.rs Mon Jul 26 10:26:45 2021 +0200 +++ b/rust/hg-core/src/revlog/changelog.rs Tue Sep 14 18:07:11 2021 +0200 @@ -36,7 +36,7 @@ } pub fn node_from_rev(&self, rev: Revision) -> Option<&Node> { - Some(self.revlog.index.get_entry(rev)?.hash()) + self.revlog.node_from_rev(rev) } }