From 13f05f832b01b3e49969525d0a0a0045865b9e97 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Fri, 20 Sep 2024 11:56:30 +1000 Subject: [PATCH] Minor tweaks --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- libxcp/Cargo.toml | 2 +- libxcp/src/operations.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5e210354..fd58781a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,9 +62,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "autocfg" diff --git a/Cargo.toml b/Cargo.toml index f4daedcd..bde0e276 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ test_no_perms = [] test_run_expensive = [] [dependencies] -anyhow = "1.0.88" +anyhow = "1.0.89" crossbeam-channel = "0.5.13" clap = { version = "4.5.17", features = ["derive"] } glob = "0.3.1" diff --git a/libxcp/Cargo.toml b/libxcp/Cargo.toml index 9f376b22..e5c71590 100644 --- a/libxcp/Cargo.toml +++ b/libxcp/Cargo.toml @@ -20,7 +20,7 @@ parblock = [] use_linux = ["libfs/use_linux"] [dependencies] -anyhow = "1.0.88" +anyhow = "1.0.89" blocking-threadpool = "1.0.1" cfg-if = "1.0.0" crossbeam-channel = "0.5.13" diff --git a/libxcp/src/operations.rs b/libxcp/src/operations.rs index 4053f4e5..89f62155 100644 --- a/libxcp/src/operations.rs +++ b/libxcp/src/operations.rs @@ -66,7 +66,7 @@ impl CopyHandle { /// Copy len bytes from wherever the descriptor cursors are set. fn copy_bytes(&self, len: u64, updates: &Arc) -> Result { - let mut written = 0u64; + let mut written = 0; while written < len { let bytes_to_copy = cmp::min(len - written, self.config.block_size); let bytes = copy_file_bytes(&self.infd, &self.outfd, bytes_to_copy)? as u64;