mirror of https://github.com/rust-lang/cargo
refactor(fix): Flatten workspace loading
This misses out on features that shouldn't be relevant to fix, like avoid-dev-deps. However, this prepares the way for workspace re-loading.
This commit is contained in:
parent
9fb428bd05
commit
ca699d264a
|
@ -1,5 +1,6 @@
|
|||
use crate::command_prelude::*;
|
||||
|
||||
use cargo::core::Workspace;
|
||||
use cargo::ops;
|
||||
|
||||
pub fn cli() -> Command {
|
||||
|
@ -69,7 +70,8 @@ pub fn exec(gctx: &mut GlobalContext, args: &ArgMatches) -> CliResult {
|
|||
|
||||
// Unlike other commands default `cargo fix` to all targets to fix as much
|
||||
// code as we can.
|
||||
let ws = args.workspace(gctx)?;
|
||||
let root_manifest = args.root_manifest(gctx)?;
|
||||
let ws = Workspace::new(&root_manifest, gctx)?;
|
||||
let mut opts = args.compile_options(gctx, mode, Some(&ws), ProfileChecking::LegacyTestOnly)?;
|
||||
|
||||
if !opts.filter.is_specific() {
|
||||
|
|
Loading…
Reference in New Issue