Skip to content

Commit ca699d2

Browse files
committed
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.
1 parent 9fb428b commit ca699d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bin/cargo/commands/fix.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::command_prelude::*;
22

3+
use cargo::core::Workspace;
34
use cargo::ops;
45

56
pub fn cli() -> Command {
@@ -69,7 +70,8 @@ pub fn exec(gctx: &mut GlobalContext, args: &ArgMatches) -> CliResult {
6970

7071
// Unlike other commands default `cargo fix` to all targets to fix as much
7172
// code as we can.
72-
let ws = args.workspace(gctx)?;
73+
let root_manifest = args.root_manifest(gctx)?;
74+
let ws = Workspace::new(&root_manifest, gctx)?;
7375
let mut opts = args.compile_options(gctx, mode, Some(&ws), ProfileChecking::LegacyTestOnly)?;
7476

7577
if !opts.filter.is_specific() {

0 commit comments

Comments
 (0)