Skip to content

Commit f013def

Browse files
committed
Reword cargo add suggestion
1 parent f19d066 commit f013def

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/cargo/ops/cargo_install.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ impl<'cfg, 'a> InstallablePackage<'cfg, 'a> {
209209
bail!(
210210
"there is nothing to install in `{}`, because it has no binaries\n\
211211
`cargo install` is only for installing programs, and can't be used with libraries.\n\
212-
To use a library crate, add it as a dependency in a Cargo project instead.\n\
213-
Use `cargo add {}` if you want to simply add it as a dependency of the current Cargo project.",
212+
To use a library crate, add it as a dependency to a Cargo project with `cargo add {}`.",
214213
pkg,
215214
pkg.name()
216215
);

tests/testsuite/install.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,7 @@ fn no_binaries() {
730730
"\
731731
[ERROR] there is nothing to install in `foo v0.0.1 ([..])`, because it has no binaries[..]
732732
[..]
733-
[..]
734-
Use `cargo add foo` if you want to simply add it as a dependency of the current Cargo project.",
733+
To use a library crate, add it as a dependency to a Cargo project with `cargo add foo`.",
735734
)
736735
.run();
737736
}

0 commit comments

Comments
 (0)