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]'",
137137
138138pub fn get_version_string ( is_verbose : bool ) -> String {
139139 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) ;
142141 if is_verbose {
143142 version_string. push_str ( & format ! (
144143 "release: {}.{}.{}\n " ,
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ fn simple() {
77 let p = project ( ) . build ( ) ;
88
99 p. cargo ( "version" )
10- . with_stdout ( & format ! ( "{}\n " , cargo:: version( ) ) )
10+ . with_stdout ( & format ! ( "cargo {}\n " , cargo:: version( ) ) )
1111 . run ( ) ;
1212
1313 p. cargo ( "--version" )
14- . with_stdout ( & format ! ( "{}\n " , cargo:: version( ) ) )
14+ . with_stdout ( & format ! ( "cargo {}\n " , cargo:: version( ) ) )
1515 . run ( ) ;
1616}
1717
You can’t perform that action at this time.
0 commit comments