Skip to content

Commit 48cd600

Browse files
committed
fix(batch): prefix unused variable with underscore in retry pattern
The error variable in the retry pattern was captured but not used, triggering unused_variables warning with -D warnings. Changed 'Err(e)' to 'Err(_)' for the retry case since the error is intentionally ignored.
1 parent bb2f62e commit 48cd600

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/cortex-batch/src/batch_ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async fn atomic_write(path: &Path, content: &[u8]) -> std::io::Result<()> {
6565

6666
match fs::rename(&temp_path, path).await {
6767
Ok(()) => break,
68-
Err(e) if retries > 0 => {
68+
Err(_) if retries > 0 => {
6969
retries -= 1;
7070
tokio::time::sleep(tokio::time::Duration::from_millis(50)).await;
7171
continue;

src/cortex-batch/src/multi_edit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async fn atomic_write(path: &Path, content: &[u8]) -> std::io::Result<()> {
6565

6666
match fs::rename(&temp_path, path).await {
6767
Ok(()) => break,
68-
Err(e) if retries > 0 => {
68+
Err(_) if retries > 0 => {
6969
retries -= 1;
7070
tokio::time::sleep(tokio::time::Duration::from_millis(50)).await;
7171
continue;

0 commit comments

Comments
 (0)