hg-core: silence dead-code warning by adding RevlogEntry::revion() accessor
Nightly `rustc` warns about the `RevlogEntry::rev` field not being
used. Rather than removing it, I added an accessor since it seems
useful to be able to get the entry's revision.
Differential Revision: https://phab.mercurial-scm.org/D11548
--- a/rust/hg-core/src/revlog/revlog.rs Fri Oct 01 18:14:56 2021 +0200
+++ b/rust/hg-core/src/revlog/revlog.rs Fri Oct 01 08:44:56 2021 -0700
@@ -304,6 +304,10 @@
}
impl<'a> RevlogEntry<'a> {
+ pub fn revision(&self) -> Revision {
+ self.rev
+ }
+
/// Extract the data contained in the entry.
pub fn data(&self) -> Result<Cow<'_, [u8]>, RevlogError> {
if self.bytes.is_empty() {