File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -137,8 +137,7 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'",
137
137
138
138
pub fn get_version_string ( is_verbose : bool ) -> String {
139
139
let version = cargo:: version ( ) ;
140
- let mut version_string = version. to_string ( ) ;
141
- version_string. push ( '\n' ) ;
140
+ let mut version_string = format ! ( "cargo {}\n " , version) ;
142
141
if is_verbose {
143
142
version_string. push_str ( & format ! (
144
143
"release: {}.{}.{}\n " ,
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ fn simple() {
7
7
let p = project ( ) . build ( ) ;
8
8
9
9
p. cargo ( "version" )
10
- . with_stdout ( & format ! ( "{}\n " , cargo:: version( ) ) )
10
+ . with_stdout ( & format ! ( "cargo {}\n " , cargo:: version( ) ) )
11
11
. run ( ) ;
12
12
13
13
p. cargo ( "--version" )
14
- . with_stdout ( & format ! ( "{}\n " , cargo:: version( ) ) )
14
+ . with_stdout ( & format ! ( "cargo {}\n " , cargo:: version( ) ) )
15
15
. run ( ) ;
16
16
}
17
17
You can’t perform that action at this time.
0 commit comments