bump proxmox crate to 0.1.7
The -sys, -tools and -api crate have now been merged into the proxmx crate directly. Only macro crates are separate (but still reexported by the proxmox crate in their designated locations). When we need to depend on "parts" of the crate later on we'll just have to use features. The reason is mostly that these modules had inter-dependencies which really make them not independent enough to be their own crates. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user