Skip to content

Commit

Permalink
Merge pull request #850 from foresterre/refactor/external-commands
Browse files Browse the repository at this point in the history
refactor: Emphasise command module is for external cli calls
  • Loading branch information
foresterre authored Dec 28, 2023
2 parents cd88db0 + 4c86f92 commit a25a04b
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/check/rustup_toolchain_check.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::check::Check;
use crate::command::cargo_command::CargoCommand;
use crate::command::rustup_command::RustupCommand;
use crate::context::EnvironmentContext;
use crate::download::{DownloadToolchain, ToolchainDownloader};
use crate::error::{IoError, IoErrorSource};
use crate::external_command::cargo_command::CargoCommand;
use crate::external_command::rustup_command::RustupCommand;
use crate::lockfile::LockfileHandler;
use crate::reporter::event::{CheckMethod, CheckResult, CheckToolchain, Method};
use crate::toolchain::ToolchainSpec;
Expand Down
2 changes: 1 addition & 1 deletion src/context/find.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crate::check::RunCommand;
use crate::cli::CargoMsrvOpts;
use crate::command::cargo_command::CargoCommand;
use crate::context::{
CheckCommandContext, EnvironmentContext, RustReleasesContext, SearchMethod, ToolchainContext,
UserOutputContext,
};
use crate::error::CargoMSRVError;
use crate::external_command::cargo_command::CargoCommand;
use std::convert::{TryFrom, TryInto};

#[derive(Debug)]
Expand Down
2 changes: 1 addition & 1 deletion src/context/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::context::{
};

use crate::check::RunCommand;
use crate::command::cargo_command::CargoCommand;
use crate::error::CargoMSRVError;
use crate::external_command::cargo_command::CargoCommand;
use crate::sub_command::verify::RustVersion;
use std::convert::{TryFrom, TryInto};

Expand Down
2 changes: 1 addition & 1 deletion src/default_target.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::command::rustup_command::RustupCommand;
use crate::error::{CargoMSRVError, TResult};
use crate::external_command::rustup_command::RustupCommand;

/// Uses the `.rustup/settings.toml` file to determine the default target (aka the
/// `default_host_triple`) if not set by a user.
Expand Down
2 changes: 1 addition & 1 deletion src/download.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::command::rustup_command::RustupCommand;
use crate::error::RustupInstallFailed;
use crate::external_command::rustup_command::RustupCommand;
use crate::reporter::event::SetupToolchain;
use crate::toolchain::ToolchainSpec;
use crate::{CargoMSRVError, Reporter, TResult};
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl CargoCommand {
/// Intended to be used in conjunction with [`RunCommand`] and/or [`RustupCommand`].
///
/// [`RunCommand`]: crate::check::RunCommand
/// [`RustupCommand`]: crate::command::rustup_command::RustupCommand
/// [`RustupCommand`]: crate::external_command::rustup_command::RustupCommand
// Currently we don't invoke it from here directly, but we might eventually, if
// we want to also provide some nicer structs around parsing. However compared to
// some other cargo subcommand crates, we also (currently) need rustup, so the invocation
Expand Down Expand Up @@ -75,7 +75,7 @@ impl CargoCommand {

#[cfg(test)]
mod tests {
use crate::command::cargo_command::CargoCommand;
use crate::external_command::cargo_command::CargoCommand;

#[test]
fn set_features_none() {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ pub mod toolchain;

pub(crate) mod combinators;

mod command;
mod context;
pub(crate) mod default_target;
pub(crate) mod dependency_graph;
pub(crate) mod download;
mod external_command;
pub(crate) mod formatting;
pub(crate) mod lockfile;
pub(crate) mod log_level;
Expand Down

0 comments on commit a25a04b

Please sign in to comment.