fn check_are_snapshots_compatible(
    full_snapshot_archive_info: &FullSnapshotArchiveInfo,
    incremental_snapshot_archive_info: Option<&IncrementalSnapshotArchiveInfo>,
) -> Result<()> {
    if incremental_snapshot_archive_info.is_none() {
        return Ok(());
    }

    let incremental_snapshot_archive_info = incremental_snapshot_archive_info.unwrap();

    (full_snapshot_archive_info.slot() == incremental_snapshot_archive_info.base_slot())
        .then(|| ())
        .ok_or_else(|| {
            SnapshotError::MismatchedBaseSlot(
                full_snapshot_archive_info.slot(),
                incremental_snapshot_archive_info.base_slot(),
            )
        })
}
/// Check if an incremental snapshot is compatible with a full snapshot.  This is done by checking
/// if the incremental snapshot's base slot is the same as the full snapshot's slot.
Check if an incremental snapshot is compatible with a full snapshot.  This is done by checking
if the incremental snapshot's base slot is the same as the full snapshot's slot.
Check if an incremental snapshot is compatible with a full snapshot . This is done by checking if the incremental snapshot ' s base slot is the same as the full snapshot ' s slot .
fn check_are_snapshots_compatible(
    full_snapshot_archive_info: &FullSnapshotArchiveInfo,
    incremental_snapshot_archive_info: Option<&IncrementalSnapshotArchiveInfo>,
) -> Result<()> {
    if incremental_snapshot_archive_info.is_none() {
        return Ok(());
    }
    let incremental_snapshot_archive_info = incremental_snapshot_archive_info.unwrap();
    (full_snapshot_archive_info.slot() == incremental_snapshot_archive_info.base_slot())
        .then(|| ())
        .ok_or_else(|| {
            SnapshotError::MismatchedBaseSlot(
                full_snapshot_archive_info.slot(),
                incremental_snapshot_archive_info.base_slot(),
            )
        })
}
fn check_are_snapshots_compatible ( full_snapshot_archive_info : & FullSnapshotArchiveInfo , incremental_snapshot_archive_info : Option < & IncrementalSnapshotArchiveInfo > , ) -> Result < ( ) > { if incremental_snapshot_archive_info . is_none ( ) { return Ok ( ( ) ) ; } let incremental_snapshot_archive_info = incremental_snapshot_archive_info . unwrap ( ) ; ( full_snapshot_archive_info . slot ( ) == incremental_snapshot_archive_info . base_slot ( ) ) . then ( | | ( ) ) . ok_or_else ( | | { SnapshotError :: MismatchedBaseSlot ( full_snapshot_archive_info . slot ( ) , incremental_snapshot_archive_info . base_slot ( ) , ) } ) }
Check if an incremental snapshot is compatible with a full snapshot.
Check if an incremental snapshot is compatible with a full snapshot .
full_snapshot_archive_info
&FullSnapshotArchiveInfo
incremental_snapshot_archive_info
Option<&IncrementalSnapshotArchiveInfo>