rust/hg-core/src/revlog/changelog.rs
changeset 47964 796206e74b10
parent 47963 001d747c2baf
child 47967 6c653d9d41b8
equal deleted inserted replaced
47963:001d747c2baf 47964:796206e74b10
    55             .filter(|line| !line.is_empty())
    55             .filter(|line| !line.is_empty())
    56     }
    56     }
    57 
    57 
    58     /// Return the node id of the `manifest` referenced by this `changelog`
    58     /// Return the node id of the `manifest` referenced by this `changelog`
    59     /// entry.
    59     /// entry.
    60     pub fn manifest_node(&self) -> Result<&[u8], RevlogError> {
    60     pub fn manifest_node(&self) -> Result<Node, HgError> {
    61         self.lines()
    61         Node::from_hex_for_repo(
    62             .next()
    62             self.lines()
    63             .ok_or_else(|| HgError::corrupted("empty changelog entry").into())
    63                 .next()
       
    64                 .ok_or_else(|| HgError::corrupted("empty changelog entry"))?,
       
    65         )
    64     }
    66     }
    65 }
    67 }