Show More
@@ -400,10 +400,10 b' impl Revlog {' | |||
|
400 | 400 | /// The revlog entry's bytes and the necessary informations to extract |
|
401 | 401 | /// the entry's data. |
|
402 | 402 | #[derive(Clone)] |
|
403 |
pub struct RevlogEntry<' |
|
|
404 |
revlog: &' |
|
|
403 | pub struct RevlogEntry<'revlog> { | |
|
404 | revlog: &'revlog Revlog, | |
|
405 | 405 | rev: Revision, |
|
406 |
bytes: &' |
|
|
406 | bytes: &'revlog [u8], | |
|
407 | 407 | compressed_len: u32, |
|
408 | 408 | uncompressed_len: i32, |
|
409 | 409 | base_rev_or_base_of_delta_chain: Option<Revision>, |
@@ -413,7 +413,7 b" pub struct RevlogEntry<'a> {" | |||
|
413 | 413 | hash: Node, |
|
414 | 414 | } |
|
415 | 415 | |
|
416 |
impl<' |
|
|
416 | impl<'revlog> RevlogEntry<'revlog> { | |
|
417 | 417 | pub fn revision(&self) -> Revision { |
|
418 | 418 | self.rev |
|
419 | 419 | } |
@@ -473,7 +473,7 b" impl<'a> RevlogEntry<'a> {" | |||
|
473 | 473 | } |
|
474 | 474 | |
|
475 | 475 | /// The data for this entry, after resolving deltas if any. |
|
476 |
pub fn rawdata(&self) -> Result<Cow<' |
|
|
476 | pub fn rawdata(&self) -> Result<Cow<'revlog, [u8]>, HgError> { | |
|
477 | 477 | let mut entry = self.clone(); |
|
478 | 478 | let mut delta_chain = vec![]; |
|
479 | 479 | |
@@ -503,8 +503,8 b" impl<'a> RevlogEntry<'a> {" | |||
|
503 | 503 | |
|
504 | 504 | fn check_data( |
|
505 | 505 | &self, |
|
506 |
data: Cow<' |
|
|
507 |
) -> Result<Cow<' |
|
|
506 | data: Cow<'revlog, [u8]>, | |
|
507 | ) -> Result<Cow<'revlog, [u8]>, HgError> { | |
|
508 | 508 | if self.revlog.check_hash( |
|
509 | 509 | self.p1, |
|
510 | 510 | self.p2, |
@@ -525,7 +525,7 b" impl<'a> RevlogEntry<'a> {" | |||
|
525 | 525 | } |
|
526 | 526 | } |
|
527 | 527 | |
|
528 |
pub fn data(&self) -> Result<Cow<' |
|
|
528 | pub fn data(&self) -> Result<Cow<'revlog, [u8]>, HgError> { | |
|
529 | 529 | let data = self.rawdata()?; |
|
530 | 530 | if self.is_censored() { |
|
531 | 531 | return Err(HgError::CensoredNodeError); |
@@ -535,7 +535,7 b" impl<'a> RevlogEntry<'a> {" | |||
|
535 | 535 | |
|
536 | 536 | /// Extract the data contained in the entry. |
|
537 | 537 | /// This may be a delta. (See `is_delta`.) |
|
538 |
fn data_chunk(&self) -> Result<Cow<' |
|
|
538 | fn data_chunk(&self) -> Result<Cow<'revlog, [u8]>, HgError> { | |
|
539 | 539 | if self.bytes.is_empty() { |
|
540 | 540 | return Ok(Cow::Borrowed(&[])); |
|
541 | 541 | } |
General Comments 0
You need to be logged in to leave comments.
Login now