Revert "Fix versioncheck test"

This reverts commit 1e7b1ccb2a.
This commit is contained in:
Cameron Steffen 2021-02-26 12:30:43 -06:00
parent aef6dc23ee
commit d71ed26fd2

View File

@ -9,15 +9,15 @@ fn check_that_clippy_lints_and_clippy_utils_have_the_same_version_as_clippy() {
.expect("could not obtain cargo metadata"); .expect("could not obtain cargo metadata");
for krate in &["clippy_lints", "clippy_utils"] { for krate in &["clippy_lints", "clippy_utils"] {
let krate_meta = clippy_meta let krate_meta = cargo_metadata::MetadataCommand::new()
.packages .current_dir(std::env::current_dir().unwrap().join(krate))
.iter() .no_deps()
.find(|package| package.name == *krate) .exec()
.expect("could not obtain cargo metadata"); .expect("could not obtain cargo metadata");
assert_eq!(krate_meta.version, clippy_meta.packages[0].version); assert_eq!(krate_meta.packages[0].version, clippy_meta.packages[0].version);
for package in &clippy_meta.packages[0].dependencies { for package in &clippy_meta.packages[0].dependencies {
if package.name == *krate { if package.name == *krate {
assert!(package.req.matches(&krate_meta.version)); assert!(package.req.matches(&krate_meta.packages[0].version));
break; break;
} }
} }