Skip to content

Commit f0f19a6

Browse files
sypharjyn514
authored andcommitted
use BufReader to read archive index files
1 parent 22d6494 commit f0f19a6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/storage/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ impl Storage {
249249
.join(&remote_index_path);
250250

251251
if local_index_path.exists() {
252-
let mut file = fs::File::open(local_index_path)?;
253-
archive_index::Index::load(&mut file)
252+
archive_index::Index::load(io::BufReader::new(fs::File::open(local_index_path)?))
254253
} else {
255254
let index_content = self.get(&remote_index_path, std::usize::MAX)?.content;
256255

0 commit comments

Comments
 (0)