History

upgrade smart-release to the latest `crates-index`

Sebastian Thiel committed 3 years ago

Commit 73ec02b1 parent f8522433 files · +7 −20Browse files

Unified · Split

3 files
  1. cargo-smart-release/Cargo.lock +4 −4
  2. cargo-smart-release/Cargo.toml +2 −2
  3. cargo-smart-release/src/crates_index.rs +1 −14
cargo-smart-release/Cargo.lock+4−4
@@ -189,9 +189,9 @@ dependencies = [ · 188 unmodified lines
189189
190190 [[package]]
191191 name = "cargo_metadata"
192−version = "0.15.4"
192+version = "0.17.0"
193193 source = "registry+https://github.com/rust-lang/crates.io-index"
194−checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
194+checksum = "e7daec1a2a2129eeba1644b220b4647ec537b0b5d4bfd6876fcc5a540056b592"
195195 dependencies = [
196196 "camino",
197197 "cargo-platform",
@@ -309,9 +309,9 @@ dependencies = [ · 111 unmodified lines
309309
310310 [[package]]
311311 name = "crates-index"
312−version = "2.0.0"
312+version = "2.1.0"
313313 source = "registry+https://github.com/rust-lang/crates.io-index"
314−checksum = "3feb29cc02fb72a5999ea88eaf38e82fb9ef453a746925d3bf74ebc25940c34c"
314+checksum = "a2d899e96f67edf44af465951d34f354c7bc04d10a42b813537cd70d62dfbb50"
315315 dependencies = [
316316 "gix",
317317 "hex",
cargo-smart-release/Cargo.toml+2−2
@@ -28,11 +28,11 @@ gix = { version = "^0.50.0", default-features = false, features = ["max-performa · 27 unmodified lines
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"
cargo-smart-release/src/crates_index.rs+1−14
@@ -1,5 +1,3 @@
1−use std::path::PathBuf;
2−
31 pub struct Index {
42 inner: Option<crates_index::GitIndex>,
53 }
@@ -7,13 +5,8 @@ pub struct Index { · 1 unmodified line
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 { · 9 unmodified lines
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−}