Mercurial > hg
comparison rust/hg-core/src/revlog/index.rs @ 45593:da30e4b553c3
hg-core: minor docstring update (D8958#inline-14991 followup)
Differential Revision: https://phab.mercurial-scm.org/D9097
author | Antoine cezar<acezar@chwitlabs.fr> |
---|---|
date | Mon, 28 Sep 2020 13:55:47 +0200 |
parents | a886ffd2ffc6 |
children | 900b9b79b99c |
comparison
equal
deleted
inserted
replaced
45592:a886ffd2ffc6 | 45593:da30e4b553c3 |
---|---|
124 /// It has to be overridden with 0. | 124 /// It has to be overridden with 0. |
125 offset_override: Option<usize>, | 125 offset_override: Option<usize>, |
126 } | 126 } |
127 | 127 |
128 impl<'a> IndexEntry<'a> { | 128 impl<'a> IndexEntry<'a> { |
129 /// Return the offset of the data if not overridden by offset_override. | 129 /// Return the offset of the data. |
130 pub fn offset(&self) -> usize { | 130 pub fn offset(&self) -> usize { |
131 if let Some(offset_override) = self.offset_override { | 131 if let Some(offset_override) = self.offset_override { |
132 offset_override | 132 offset_override |
133 } else { | 133 } else { |
134 let mut bytes = [0; 8]; | 134 let mut bytes = [0; 8]; |