diff --git a/src/cargo/ops/cargo_update.rs b/src/cargo/ops/cargo_update.rs index 2a4982eae37..cafd0057788 100644 --- a/src/cargo/ops/cargo_update.rs +++ b/src/cargo/ops/cargo_update.rs @@ -689,9 +689,9 @@ fn print_lockfile_updates( } if ws.gctx().shell().verbosity() == Verbosity::Verbose { - ws.gctx().shell().note( - "to see how you depend on a package, run `cargo tree --invert --package @`", - )?; + ws.gctx() + .shell() + .note("to see how you depend on a package, run `cargo tree --invert @`")?; } else { if 0 < unchanged_behind { ws.gctx().shell().note(format!( diff --git a/src/cargo/ops/registry/info/view.rs b/src/cargo/ops/registry/info/view.rs index ab825acda88..4f6e46c958c 100644 --- a/src/cargo/ops/registry/info/view.rs +++ b/src/cargo/ops/registry/info/view.rs @@ -400,7 +400,7 @@ fn suggest_cargo_tree(package_id: PackageId, shell: &mut Shell) -> CargoResult<( let literal = LITERAL; shell.note(format_args!( - "to see how you depend on {name}, run `{literal}cargo tree --invert --package {name}@{version}{literal:#}`", + "to see how you depend on {name}, run `{literal}cargo tree --invert {name}@{version}{literal:#}`", name = package_id.name(), version = package_id.version(), )) diff --git a/tests/testsuite/cargo_info/specify_version_within_ws_and_match_with_lockfile/stderr.term.svg b/tests/testsuite/cargo_info/specify_version_within_ws_and_match_with_lockfile/stderr.term.svg index 9b0be4e7326..db8750aca55 100644 --- a/tests/testsuite/cargo_info/specify_version_within_ws_and_match_with_lockfile/stderr.term.svg +++ b/tests/testsuite/cargo_info/specify_version_within_ws_and_match_with_lockfile/stderr.term.svg @@ -1,4 +1,4 @@ - +