Fixup some wrong dependencies (#12899)

* Fixup some wrong dependencies

Dev dependencies should not appear in the feature list. If features are required, they should be
directly enabled for the `dev-dependency`.

* More fixups

* Fix fix

* Remove deprecated feature

* Make all work properly and nice!!

* FMT

* Fix formatting
This commit is contained in:
Bastian Köcher
2022-12-13 22:47:51 +01:00
committed by GitHub
parent 962580c82e
commit c0c8d6305f
17 changed files with 119 additions and 77 deletions
@@ -379,14 +379,15 @@ fn find_package_by_manifest_path<'a>(
if let Some(pkg) = crate_metadata.packages.iter().find(|p| p.manifest_path == manifest_path) {
return pkg
}
let pkgs_by_name = crate_metadata
.packages
.iter()
.filter(|p| p.name == pkg_name)
.collect::<Vec<_>>();
let mut pkgs = pkgs_by_name.iter();
if let Some(pkg) = pkgs.next() {
if pkgs.next().is_some() {
if let Some(pkg) = pkgs_by_name.first() {
if pkgs_by_name.len() > 1 {
panic!(
"Found multiple packages matching the name {pkg_name} ({manifest_path:?}): {:?}",
pkgs_by_name
@@ -395,7 +396,7 @@ fn find_package_by_manifest_path<'a>(
return pkg
}
} else {
panic!("Failed to find entry for package {pkg_name} ({manifest_path:?})");
panic!("Failed to find entry for package {pkg_name} ({manifest_path:?}).");
}
}