Skip to content

Commit

Permalink
NOISSUE - Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcconnell26 committed Feb 24, 2021
1 parent f638400 commit 0cf1f5f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cargo-geiger/src/mapping/geiger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions cargo-geiger/src/mapping/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ use super::{
};

use crate::mapping::{
ToCargoGeigerDependencyKind, ToCargoGeigerSource,
ToCargoMetadataPackage,
ToCargoGeigerDependencyKind, ToCargoGeigerSource, ToCargoMetadataPackage,
};

use cargo_metadata::{DependencyKind, Metadata, PackageId};
Expand Down
19 changes: 8 additions & 11 deletions cargo-geiger/src/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down Expand Up @@ -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<DependencyKind>,
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();
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 0cf1f5f

Please sign in to comment.