Skip to content

Commit 5bc410e

Browse files
committed
Update top-crates to Cargo 0.56
1 parent 7b5baeb commit 5bc410e

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

top-crates/Cargo.lock

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

top-crates/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0"
99
repository = "https://github.com/integer32llc/rust-playground"
1010

1111
[dependencies]
12-
cargo = "0.54.0"
12+
cargo = "0.56.0"
1313
itertools = "0.10.0"
1414
reqwest = { version = "0.11.0", features = ["blocking"] }
1515
serde = "1.0.1"

top-crates/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use cargo::{
1010
Dependency, Package, Source, SourceId, TargetKind,
1111
},
1212
sources::RegistrySource,
13-
util::Config,
13+
util::{Config, VersionExt},
1414
};
1515
use itertools::Itertools;
1616
use serde::{Deserialize, Serialize};
@@ -241,7 +241,7 @@ pub fn generate_info(modifications: &Modifications) -> (BTreeMap<String, Depende
241241

242242
// Query the registry for a summary of this crate.
243243
// Usefully, this doesn't seem to include yanked versions
244-
let dep = Dependency::parse_no_deprecated(name, None, crates_io)
244+
let dep = Dependency::parse(name, None, crates_io)
245245
.unwrap_or_else(|e| panic!("Unable to parse dependency for {}: {}", name, e));
246246

247247
let matches = source.query_vec(&dep).unwrap_or_else(|e| {
@@ -271,7 +271,7 @@ pub fn generate_info(modifications: &Modifications) -> (BTreeMap<String, Depende
271271
// Resolve transitive dependencies.
272272
let mut registry = PackageRegistry::new(&config).expect("Unable to create package registry");
273273
registry.lock_patches();
274-
let try_to_use = HashSet::new();
274+
let try_to_use = Default::default();
275275
let resolve = resolver::resolve(&summaries, &[], &mut registry, &try_to_use, None, true)
276276
.expect("Unable to resolve dependencies");
277277

0 commit comments

Comments
 (0)