Skip to content

Commit 567fd02

Browse files
committed
f tmp_file_name rather than rand_str
1 parent 60341ba commit 567fd02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/io/fs_store.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ impl KVStore for FilesystemStore {
8989
// open(tmpname), write(tmpfile), fsync(tmpfile), close(tmpfile), rename(), fsync(dir)
9090
let mut tmp_file_path = dest_file_path.clone();
9191
let mut rng = thread_rng();
92-
let rand_str: String = (0..7).map(|_| rng.sample(Alphanumeric) as char).collect();
93-
let ext = format!("{}.tmp", rand_str);
92+
let tmp_file_name: String = (0..7).map(|_| rng.sample(Alphanumeric) as char).collect();
93+
let ext = format!("{}.tmp", tmp_file_name);
9494
tmp_file_path.set_extension(ext);
9595

9696
let mut tmp_file = fs::File::create(&tmp_file_path)?;

0 commit comments

Comments
 (0)