Skip to content

Commit

Permalink
Merge pull request #140 from jmcconnell26/ISSUE-16-RenameUtilsModuleT…
Browse files Browse the repository at this point in the history
…oMapping

ISSUE-16 - Rename utils module to mapping
  • Loading branch information
anderejd authored Nov 15, 2020
2 parents 91793d2 + 9adbf18 commit 24a783d
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion cargo-geiger/src/format/display.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::format::pattern::Pattern;
use crate::format::Chunk;

use crate::utils::{
use crate::mapping::{
CargoMetadataParameters, GetPackageNameFromCargoMetadataPackageId,
GetPackageVersionFromCargoMetadataPackageId,
};
Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/src/format/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::format::{Chunk, RawChunk};

use super::display::Display;

use crate::utils::CargoMetadataParameters;
use crate::mapping::CargoMetadataParameters;
use cargo::core::manifest::ManifestMetadata;
use std::error::Error;

Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/src/format/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use handle_text_tree_line::{
};
use total_package_counts::TotalPackageCounts;

use crate::utils::CargoMetadataParameters;
use crate::mapping::CargoMetadataParameters;
use cargo::core::package::PackageSet;
use cargo_geiger_serde::{Count, CounterBlock};
use std::collections::HashSet;
Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/src/format/table/handle_text_tree_line.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::format::emoji_symbols::EmojiSymbols;
use crate::format::print_config::colorize;
use crate::format::{get_kind_group_name, CrateDetectionStatus, SymbolKind};
use crate::mapping::{CargoMetadataParameters, ToPackage};
use crate::scan::unsafe_stats;
use crate::utils::{CargoMetadataParameters, ToPackage};

use super::total_package_counts::TotalPackageCounts;
use super::TableParameters;
Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/src/graph.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::args::{Args, DepsArgs, TargetArgs};
use crate::cli::get_cfgs;
use crate::utils::{
use crate::mapping::{
CargoMetadataParameters, DepsNotReplaced, MatchesIgnoringSource,
Replacement,
};
Expand Down
4 changes: 2 additions & 2 deletions cargo-geiger/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ mod args;
mod cli;
mod format;
mod graph;
mod mapping;
mod scan;
mod tree;
mod utils;

use crate::args::{Args, HELP};
use crate::cli::{
Expand All @@ -25,7 +25,7 @@ use crate::cli::{
use crate::graph::build_graph;
use crate::scan::scan;

use crate::utils::{
use crate::mapping::{
CargoMetadataParameters, ToCargoMetadataPackage, ToCargoMetadataPackageId,
};
use cargo::core::shell::{ColorChoice, Shell};
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::ToCargoMetadataDependencyKind;

use crate::utils::{ToCargoMetadataPackage, ToCargoMetadataPackageId};
use crate::mapping::{ToCargoMetadataPackage, ToCargoMetadataPackageId};

use cargo::core::dependency::DepKind;
use cargo::core::{Package, PackageId};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::utils::{
use crate::mapping::{
GetManifestMetadataFromCargoMetadataPackageId,
GetPackageNameFromCargoMetadataPackageId,
GetPackageVersionFromCargoMetadataPackageId, ToPackage,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cargo-geiger/src/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod rs_file;
use crate::args::Args;
use crate::format::print_config::PrintConfig;
use crate::graph::Graph;
use crate::utils::{
use crate::mapping::{
CargoMetadataParameters, ToCargoCoreDepKind, ToCargoGeigerPackageId,
};

Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/src/scan/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ mod table;
use crate::args::FeaturesArgs;
use crate::format::print_config::OutputFormat;
use crate::graph::Graph;
use crate::mapping::CargoMetadataParameters;
use crate::scan::rs_file::resolve_rs_file_deps;
use crate::utils::CargoMetadataParameters;

use super::find::find_unsafe;
use super::{
Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/src/scan/default/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use super::super::{
};
use super::scan;

use crate::utils::CargoMetadataParameters;
use crate::mapping::CargoMetadataParameters;
use cargo::core::shell::Verbosity;
use cargo::core::{PackageSet, Workspace};
use cargo::{CliError, CliResult};
Expand Down
4 changes: 3 additions & 1 deletion cargo-geiger/src/scan/find.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
use crate::format::print_config::PrintConfig;
use crate::mapping::{
CargoMetadataParameters, GetRoot, ToCargoMetadataPackage,
};
use crate::scan::rs_file::{
into_is_entry_point_and_path_buf, into_rs_code_file, into_target_kind,
is_file_with_ext, RsFile, RsFileMetricsWrapper,
};
use crate::scan::PackageMetrics;
use crate::utils::{CargoMetadataParameters, GetRoot, ToCargoMetadataPackage};

use super::{GeigerContext, ScanMode};

Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/src/scan/forbid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::{package_metrics, ScanMode, ScanParameters};

use table::scan_forbid_to_table;

use crate::utils::CargoMetadataParameters;
use crate::mapping::CargoMetadataParameters;
use cargo::core::PackageSet;
use cargo::{CliResult, Config};
use cargo_geiger_serde::{QuickReportEntry, QuickSafetyReport};
Expand Down
6 changes: 3 additions & 3 deletions cargo-geiger/src/scan/forbid/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use crate::format::pattern::Pattern;
use crate::format::print_config::PrintConfig;
use crate::format::{get_kind_group_name, SymbolKind};
use crate::graph::Graph;
use crate::tree::traversal::walk_dependency_tree;
use crate::tree::TextTreeLine;
use crate::utils::{
use crate::mapping::{
CargoMetadataParameters, GetManifestMetadataFromCargoMetadataPackageId,
};
use crate::tree::traversal::walk_dependency_tree;
use crate::tree::TextTreeLine;

use super::super::find::find_unsafe;
use super::super::ScanMode;
Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/src/tree/traversal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ mod dependency_node;

use crate::format::print_config::PrintConfig;
use crate::graph::Graph;
use crate::mapping::CargoMetadataParameters;
use crate::tree::TextTreeLine;
use crate::utils::CargoMetadataParameters;

use super::construct_tree_vines_string;
use dependency_kind::walk_dependency_kind;
Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/src/tree/traversal/dependency_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::tree::{get_tree_symbols, TextTreeLine, TreeSymbols};

use super::dependency_node::walk_dependency_node;

use crate::utils::CargoMetadataParameters;
use crate::mapping::CargoMetadataParameters;
use cargo::core::dependency::DepKind;
use cargo::core::PackageSet;
use std::iter::Peekable;
Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/src/tree/traversal/dependency_node.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::format::print_config::PrintConfig;
use crate::graph::Graph;
use crate::mapping::{CargoMetadataParameters, ToCargoCoreDepKind};
use crate::tree::traversal::WalkDependencyParameters;
use crate::tree::TextTreeLine;
use crate::utils::{CargoMetadataParameters, ToCargoCoreDepKind};

use super::construct_tree_vines_string;
use super::walk_dependency_kind;
Expand Down

0 comments on commit 24a783d

Please sign in to comment.