pub(crate) fn maybe_last_index(&self) -> Option<u64> {
        if !self.entries.is_empty() {
            return Some(self.offset + self.entries.len() as u64 - 1);
        }
        self.snapshot
            .as_ref()
            .map(|snapshot| snapshot.get_metadata().get_index())
    }
// maybe_last_index returns last index if it has at least one
// unstable entry or snapshot
maybe_last_index returns last index if it has at least one
unstable entry or snapshot
maybe_last_index returns last index if it has at least one unstable entry or snapshot
pub(crate) fn maybe_last_index(&self) -> Option<u64> {
        if !self.entries.is_empty() {
            return Some(self.offset + self.entries.len() as u64 - 1);
        }
        self.snapshot
            .as_ref()
            .map(|snapshot| snapshot.get_metadata().get_index())
    }
pub ( crate ) fn maybe_last_index ( & self ) -> Option < u64 > { if ! self . entries . is_empty ( ) { return Some ( self . offset + self . entries . len ( ) as u64 - 1 ) ; } self . snapshot . as_ref ( ) . map ( | snapshot | snapshot . get_metadata ( ) . get_index ( ) ) }
maybe_last_index returns last index if it has at least one
unstable entry or snapshot
maybe_last_index returns last index if it has at least one unstable entry or snapshot
&self