Skip to content

Commit cf8ae16

Browse files
committed
upgrade crates-index
1 parent 8f6b9e4 commit cf8ae16

File tree

3 files changed

+50
-9
lines changed

3 files changed

+50
-9
lines changed

Cargo.lock

Lines changed: 47 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tracing-subscriber = { version = "0.3.16", default-features = false, features =
3131
tracing-log = "0.1.3"
3232
regex = "1"
3333
clap = { version = "4.0.22", features = [ "derive" ] }
34-
crates-index = { version = "1.0.0", optional = true }
34+
crates-index = { version = "2.0.0", default-features = false, features = ["git", "git-performance", "parallel"], optional = true }
3535
rayon = "1.6.1"
3636
num_cpus = "1.15.0"
3737
crates-index-diff = { version = "20.0.0", features = [ "max-performance" ]}

src/index/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ impl Index {
9090
}
9191

9292
#[cfg(feature = "consistency_check")]
93-
pub(crate) fn crates(&self) -> Result<crates_index::Index> {
93+
pub(crate) fn crates(&self) -> Result<crates_index::GitIndex> {
9494
tracing::debug!("Opening with `crates_index`");
9595
// crates_index requires the repo url to match the existing origin or it tries to reinitialize the repo
9696
let repo_url = self
9797
.repository_url
9898
.as_deref()
9999
.unwrap_or("https://github.com/rust-lang/crates.io-index");
100-
let mut index = crates_index::Index::with_path(&self.path, repo_url)?;
100+
let mut index = crates_index::GitIndex::with_path(&self.path, repo_url)?;
101101
index.update()?;
102102
Ok(index)
103103
}

0 commit comments

Comments
 (0)