Skip to content

Commit 73ec02b

Browse files
committed
upgrade smart-release to the latest crates-index
1 parent f852243 commit 73ec02b

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

cargo-smart-release/Cargo.lock

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

cargo-smart-release/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ gix = { version = "^0.50.0", default-features = false, features = ["max-performa
2828
anyhow = "1.0.42"
2929
clap = { version = "4.1.0", features = ["derive", "cargo"] }
3030
env_logger = { version = "0.10.0", default-features = false, features = ["humantime", "auto-color"] }
31-
cargo_metadata = "0.15.0"
31+
cargo_metadata = "0.17.0"
3232
log = "0.4.14"
3333
toml_edit = "0.19.1"
3434
semver = "1.0.4"
35-
crates-index = { version = "2.0.0", default-features = false, features = ["git-performance", "git-https"] }
35+
crates-index = { version = "2.1.0", default-features = false, features = ["git-performance", "git-https"] }
3636
cargo_toml = "0.15.1"
3737
winnow = "0.5.1"
3838
git-conventional = "0.12.0"
Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
use std::path::PathBuf;
2-
31
pub struct Index {
42
inner: Option<crates_index::GitIndex>,
53
}
64

75
impl Index {
86
/// Like the original one, but doesn't create it if it doesn't exist
97
pub fn new_cargo_default() -> Result<Index, crates_index::Error> {
10-
let path = default_path();
118
Ok(Index {
12-
inner: if path.is_dir() {
13-
crates_index::GitIndex::new_cargo_default()?.into()
14-
} else {
15-
None
16-
},
9+
inner: crates_index::GitIndex::try_new_cargo_default()?,
1710
})
1811
}
1912

@@ -29,9 +22,3 @@ impl Index {
2922
self.inner.as_ref().and_then(|idx| idx.crate_(name))
3023
}
3124
}
32-
33-
fn default_path() -> PathBuf {
34-
crates_index::local_path_and_canonical_url(crates_index::git::URL, None)
35-
.expect("defaults are well-known")
36-
.0
37-
}

0 commit comments

Comments
 (0)