We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22d6494 commit 8c76fa2Copy full SHA for 8c76fa2
src/storage/mod.rs
@@ -14,7 +14,7 @@ use path_slash::PathExt;
14
use std::{
15
collections::{HashMap, HashSet},
16
ffi::OsStr,
17
- fmt, fs,
+ fmt, fs, io,
18
io::{self, Write},
19
ops::RangeInclusive,
20
path::{Path, PathBuf},
@@ -249,8 +249,7 @@ impl Storage {
249
.join(&remote_index_path);
250
251
if local_index_path.exists() {
252
- let mut file = fs::File::open(local_index_path)?;
253
- archive_index::Index::load(&mut file)
+ archive_index::Index::load(io::BufReader::new(fs::File::open(local_index_path)?))
254
} else {
255
let index_content = self.get(&remote_index_path, std::usize::MAX)?.content;
256
0 commit comments