diff --git a/cargo-geiger/src/mapping/geiger.rs b/cargo-geiger/src/mapping/geiger.rs index 83f6568b..9c56949d 100644 --- a/cargo-geiger/src/mapping/geiger.rs +++ b/cargo-geiger/src/mapping/geiger.rs @@ -3,8 +3,8 @@ use super::{ToCargoGeigerSource, ToCargoMetadataPackage}; use cargo_metadata::Metadata; use url::Url; -use cargo_metadata::PackageId as CargoMetadataPackageId; use cargo_geiger_serde::Source as CargoGeigerSerdeSource; +use cargo_metadata::PackageId as CargoMetadataPackageId; impl ToCargoGeigerSource for CargoMetadataPackageId { fn to_cargo_geiger_source( diff --git a/cargo-geiger/src/mapping/metadata.rs b/cargo-geiger/src/mapping/metadata.rs index 34f3e4f9..781549b2 100644 --- a/cargo-geiger/src/mapping/metadata.rs +++ b/cargo-geiger/src/mapping/metadata.rs @@ -5,8 +5,7 @@ use super::{ }; use crate::mapping::{ - ToCargoGeigerDependencyKind, ToCargoGeigerSource, - ToCargoMetadataPackage, + ToCargoGeigerDependencyKind, ToCargoGeigerSource, ToCargoMetadataPackage, }; use cargo_metadata::{DependencyKind, Metadata, PackageId}; diff --git a/cargo-geiger/src/scan.rs b/cargo-geiger/src/scan.rs index acc8b4aa..60326a68 100644 --- a/cargo-geiger/src/scan.rs +++ b/cargo-geiger/src/scan.rs @@ -7,7 +7,7 @@ use crate::args::Args; use crate::format::print_config::PrintConfig; use crate::graph::Graph; use crate::mapping::{ - ToCargoGeigerDependencyKind, CargoMetadataParameters, + CargoMetadataParameters, ToCargoGeigerDependencyKind, ToCargoGeigerPackageId, }; @@ -296,18 +296,12 @@ mod scan_tests { #[rstest( input_dependency_kind_option, expected_package_info_dependency_length, - case( - Some(DependencyKind::Normal), - 1, - ), - case( - None, - 0 - ) + case(Some(DependencyKind::Normal), 1,), + case(None, 0) )] fn add_dependency_to_package_info_test( input_dependency_kind_option: Option, - expected_package_info_dependency_length: usize + expected_package_info_dependency_length: usize, ) { let (krates, metadata) = construct_krates_and_metadata(); let package_id = metadata.root_package().unwrap().id.clone(); @@ -361,7 +355,10 @@ mod scan_tests { ); assert_eq!(visited, vec![dependency_index].iter().cloned().collect()); - assert_eq!(package_info.dependencies.len(), expected_package_info_dependency_length) + assert_eq!( + package_info.dependencies.len(), + expected_package_info_dependency_length + ) } #[rstest]