@@ -13,7 +13,7 @@ use build_helper::output;
13
13
use crate :: Build ;
14
14
15
15
// The version number
16
- pub const CFG_RELEASE_NUM : & str = "1.41.0 " ;
16
+ pub const CFG_RELEASE_NUM : & str = "1.41.1 " ;
17
17
18
18
pub struct GitInfo {
19
19
inner : Option < Info > ,
@@ -29,31 +29,28 @@ impl GitInfo {
29
29
pub fn new ( ignore_git : bool , dir : & Path ) -> GitInfo {
30
30
// See if this even begins to look like a git dir
31
31
if ignore_git || !dir. join ( ".git" ) . exists ( ) {
32
- return GitInfo { inner : None }
32
+ return GitInfo { inner : None } ;
33
33
}
34
34
35
35
// Make sure git commands work
36
- match Command :: new ( "git" )
37
- . arg ( "rev-parse" )
38
- . current_dir ( dir)
39
- . output ( )
40
- {
36
+ match Command :: new ( "git" ) . arg ( "rev-parse" ) . current_dir ( dir) . output ( ) {
41
37
Ok ( ref out) if out. status . success ( ) => { }
42
38
_ => return GitInfo { inner : None } ,
43
39
}
44
40
45
41
// Ok, let's scrape some info
46
- let ver_date = output ( Command :: new ( "git" ) . current_dir ( dir)
47
- . arg ( "log" ) . arg ( "-1" )
48
- . arg ( "--date=short" )
49
- . arg ( "--pretty=format:%cd" ) ) ;
50
- let ver_hash = output ( Command :: new ( "git" ) . current_dir ( dir)
51
- . arg ( "rev-parse" ) . arg ( "HEAD" ) ) ;
52
- let short_ver_hash = output ( Command :: new ( "git" )
53
- . current_dir ( dir)
54
- . arg ( "rev-parse" )
55
- . arg ( "--short=9" )
56
- . arg ( "HEAD" ) ) ;
42
+ let ver_date = output (
43
+ Command :: new ( "git" )
44
+ . current_dir ( dir)
45
+ . arg ( "log" )
46
+ . arg ( "-1" )
47
+ . arg ( "--date=short" )
48
+ . arg ( "--pretty=format:%cd" ) ,
49
+ ) ;
50
+ let ver_hash = output ( Command :: new ( "git" ) . current_dir ( dir) . arg ( "rev-parse" ) . arg ( "HEAD" ) ) ;
51
+ let short_ver_hash = output (
52
+ Command :: new ( "git" ) . current_dir ( dir) . arg ( "rev-parse" ) . arg ( "--short=9" ) . arg ( "HEAD" ) ,
53
+ ) ;
57
54
GitInfo {
58
55
inner : Some ( Info {
59
56
commit_date : ver_date. trim ( ) . to_string ( ) ,
0 commit comments