Skip to content

Commit 569a167

Browse files
committed
consistency check: update local crates.io index before querying it
1 parent d01b9e3 commit 569a167

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ impl Index {
9595
.repository_url
9696
.as_deref()
9797
.unwrap_or("https://github.com/rust-lang/crates.io-index");
98-
crates_index::Index::with_path(&self.path, repo_url).map_err(Into::into)
98+
let mut index = crates_index::Index::with_path(&self.path, repo_url)?;
99+
index.update()?;
100+
Ok(index)
99101
}
100102

101103
pub fn api(&self) -> &Api {

0 commit comments

Comments
 (0)