pub async fn shrink(&mut self) -> Result<(), IoError> {
        let target_len = (self.first_empty_slot * INDEX_ENTRY_SIZE) as u64;
        debug!(
            target_len,
            base_offset = self.base_offset,
            "shrinking index"
        );
        self.file.set_len(target_len).await
    }
// shrink index file to last know position
shrink index file to last know position
shrink index file to last know position
pub async fn shrink(&mut self) -> Result<(), IoError> {
        let target_len = (self.first_empty_slot * INDEX_ENTRY_SIZE) as u64;
        debug!(
            target_len,
            base_offset = self.base_offset,
            "shrinking index"
        );
        self.file.set_len(target_len).await
    }
pub async fn shrink ( & mut self ) -> Result < ( ) , IoError > { let target_len = ( self . first_empty_slot * INDEX_ENTRY_SIZE ) as u64 ; debug ! ( target_len base_offset self base_offset " " ) ; self . file . set_len ( target_len ) . await }
shrink index file to last know position
shrink index file to last know position
&mut self
&mut self