Skip to content

Commit 1c94e2f

Browse files
committed
fix typo & const
1 parent e981dfb commit 1c94e2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/storage/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ use std::{
3535
num::ParseIntError,
3636
ops::RangeInclusive,
3737
path::{Path, PathBuf},
38+
str::FromStr,
3839
sync::{
3940
Arc,
4041
atomic::{AtomicU64, Ordering},
4142
},
42-
str::FromStr,
4343
};
4444
use tokio::{
4545
io::{AsyncRead, AsyncWriteExt},
@@ -51,7 +51,7 @@ use tracing_futures::Instrument as _;
5151
use walkdir::WalkDir;
5252

5353
const ZSTD_EOF_BYTES: [u8; 3] = [0x01, 0x00, 0x00];
54-
static ARCHIVE_INDEX_FILE_EXTENSION: &str = "index";
54+
const ARCHIVE_INDEX_FILE_EXTENSION: &str = "index";
5555

5656
type FileRange = RangeInclusive<u64>;
5757

@@ -424,7 +424,7 @@ impl AsyncStorage {
424424
drop(_read_guard);
425425
let _write_guard = rwlock.write().await;
426426

427-
// check existance again in case of Race Condition (TOCTOU)
427+
// check existence again in case of Race Condition (TOCTOU)
428428
if !tokio::fs::try_exists(&local_index_path).await? {
429429
// remote/folder/and/x.zip.index
430430
let remote_index_path = format!("{archive_path}.{ARCHIVE_INDEX_FILE_EXTENSION}");

0 commit comments

Comments
 (0)