File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -74,23 +74,22 @@ fn main() {
74
74
"pub const GIT_COMMIT: Option<&'static str> = {git_commit:?};\n " ,
75
75
) ) ;
76
76
if let Some ( git_commit) = git_commit {
77
- println ! ( "cargo:rustc-env=GIT_COMMIT={}" , git_commit ) ;
77
+ println ! ( "cargo:rustc-env=GIT_COMMIT={git_commit}" ) ;
78
78
}
79
79
80
80
let git_branch = current_git_branch ( ) ;
81
81
rust_code. push_str ( & format ! (
82
82
"pub const GIT_BRANCH: Option<&'static str> = {git_branch:?};\n " ,
83
83
) ) ;
84
84
if let Some ( git_branch) = git_branch {
85
- println ! ( "cargo:rustc-env=GIT_BRANCH={}" , git_branch ) ;
85
+ println ! ( "cargo:rustc-env=GIT_BRANCH={git_branch}" ) ;
86
86
}
87
87
88
88
let is_clean = if is_working_tree_clean ( ) { "" } else { "+" } ;
89
89
rust_code. push_str ( & format ! (
90
- "pub const GIT_TREE_CLEAN: Option<&'static str> = Some(\" {}\" );\n " ,
91
- is_clean
90
+ "pub const GIT_TREE_CLEAN: Option<&'static str> = Some(\" {is_clean}\" );\n " ,
92
91
) ) ;
93
- println ! ( "cargo:rustc-env=GIT_TREE_CLEAN={}" , is_clean ) ;
92
+ println ! ( "cargo:rustc-env=GIT_TREE_CLEAN={is_clean}" ) ;
94
93
95
94
let out_dir = env:: var_os ( "OUT_DIR" ) . unwrap ( ) ;
96
95
let dest_path = Path :: new ( & out_dir) . join ( "versions.rs" ) ;
You can’t perform that action at this time.
0 commit comments