mirror of
https://git.proxmox.com/git/proxmox-backup-qemu
synced 2025-10-04 19:04:24 +00:00
clippy fixes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
16298c5fa0
commit
c61d999bee
@ -218,7 +218,7 @@ pub(crate) async fn register_image(
|
||||
|
||||
match index {
|
||||
Some(index) => {
|
||||
let index_size = ((device_size + chunk_size - 1) / chunk_size) as usize;
|
||||
let index_size = device_size.div_ceil(chunk_size) as usize;
|
||||
if index_size != index.index_count() {
|
||||
bail!("previous backup has different size than current state, cannot do incremental backup (drive: {})", archive_name);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ async fn upload_handler(
|
||||
let mut digest_list = Vec::new();
|
||||
let mut offset_list = Vec::new();
|
||||
|
||||
let index_size = ((device_size + chunk_size - 1) / chunk_size) as usize;
|
||||
let index_size = device_size.div_ceil(chunk_size) as usize;
|
||||
let mut index = Vec::with_capacity(index_size);
|
||||
index.resize(index_size, [0u8; 32]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user