Skip to content

Commit 7d174f3

Browse files
committed
Auto merge of #3730 - froydnj:cargo-version-dash-fix, r=alexcrichton
use space, not dash, in `cargo --version` output #3604 inadvertently changed the output format of `cargo --version`: ``` froydnj@hawkeye:~/src/cargo.git$ ./target/x86_64-unknown-linux-gnu/release/cargo --version cargo-0.17.0-dev (ae4a4d8 2017-01-27) froydnj@hawkeye:~/src/cargo.git$ cargo --version cargo 0.16.0-nightly (6e0c18c 2017-01-27) ``` Note the dash between cargo and the version number in the newer version. Let's put the space back to not break things that might depend on the `--version` output.
2 parents 0eff854 + 635aa46 commit 7d174f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub struct VersionInfo {
7575

7676
impl fmt::Display for VersionInfo {
7777
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
78-
write!(f, "cargo-{}.{}.{}",
78+
write!(f, "cargo {}.{}.{}",
7979
self.major, self.minor, self.patch)?;
8080
match self.cfg_info.as_ref().map(|ci| &ci.release_channel) {
8181
Some(channel) => {

0 commit comments

Comments
 (0)