]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/backup/data_blob.rs
typo fixes all over the place
[proxmox-backup.git] / src / backup / data_blob.rs
index 925e9ce6dbd89b9eab4532eb95dff7373a2a7a8f..0886cc86f4d0f1307f06b88c54cf728219eb5716 100644 (file)
@@ -1,4 +1,4 @@
-use failure::*;
+use anyhow::{bail, Error};
 use std::convert::TryInto;
 
 use proxmox::tools::io::{ReadExt, WriteExt};
@@ -48,13 +48,13 @@ impl DataBlob {
 
     /// accessor to crc32 checksum
     pub fn crc(&self) -> u32 {
-        let crc_o = proxmox::tools::offsetof!(DataBlobHeader, crc);
+        let crc_o = proxmox::offsetof!(DataBlobHeader, crc);
         u32::from_le_bytes(self.raw_data[crc_o..crc_o+4].try_into().unwrap())
     }
 
     // set the CRC checksum field
     pub fn set_crc(&mut self, crc: u32) {
-        let crc_o = proxmox::tools::offsetof!(DataBlobHeader, crc);
+        let crc_o = proxmox::offsetof!(DataBlobHeader, crc);
         self.raw_data[crc_o..crc_o+4].copy_from_slice(&crc.to_le_bytes());
     }
 
@@ -311,7 +311,7 @@ impl DataBlob {
     /// Verify digest and data length for unencrypted chunks.
     ///
     /// To do that, we need to decompress data first. Please note that
-    /// this is noth possible for encrypted chunks.
+    /// this is north possible for encrypted chunks.
     pub fn verify_unencrypted(
         &self,
         expected_chunk_size: usize,