##// END OF EJS Templates
rust-changelog: introduce ChangelogEntry parent entries accessors...
Georges Racinet -
r51271:071a6c1d default
parent child Browse files
Show More
@@ -106,6 +106,20 b" impl<'changelog> ChangelogEntry<'changel"
106 106 pub fn as_revlog_entry(&self) -> &RevlogEntry {
107 107 &self.revlog_entry
108 108 }
109
110 pub fn p1_entry(&self) -> Result<Option<ChangelogEntry>, RevlogError> {
111 Ok(self
112 .revlog_entry
113 .p1_entry()?
114 .map(|revlog_entry| Self { revlog_entry }))
115 }
116
117 pub fn p2_entry(&self) -> Result<Option<ChangelogEntry>, RevlogError> {
118 Ok(self
119 .revlog_entry
120 .p2_entry()?
121 .map(|revlog_entry| Self { revlog_entry }))
122 }
109 123 }
110 124
111 125 /// `Changelog` entry which knows how to interpret the `changelog` data bytes.
General Comments 0
You need to be logged in to leave comments. Login now