We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
tmp_file_name
rand_str
1 parent 60341ba commit 567fd02Copy full SHA for 567fd02
1 file changed
src/io/fs_store.rs
@@ -89,8 +89,8 @@ impl KVStore for FilesystemStore {
89
// open(tmpname), write(tmpfile), fsync(tmpfile), close(tmpfile), rename(), fsync(dir)
90
let mut tmp_file_path = dest_file_path.clone();
91
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);
+ let tmp_file_name: String = (0..7).map(|_| rng.sample(Alphanumeric) as char).collect();
+ let ext = format!("{}.tmp", tmp_file_name);
94
tmp_file_path.set_extension(ext);
95
96
let mut tmp_file = fs::File::create(&tmp_file_path)?;
0 commit comments