Prettier version wo git dir; Use rustc compile time version
This commit is contained in:
parent
7371beb26c
commit
6c81f1fb74
@ -26,12 +26,12 @@ use std::path::Path;
|
||||
fn main() {
|
||||
vergen(OutputFns::all()).unwrap();
|
||||
let out_dir = env::var("OUT_DIR").unwrap();
|
||||
let dest_path = Path::new(&out_dir).join("rustc_version.rs");
|
||||
let mut f = File::create(&dest_path).unwrap();
|
||||
let dest_path = Path::new(&out_dir).join("rustc_version.rs");
|
||||
let mut f = File::create(&dest_path).unwrap();
|
||||
f.write_all(format!("
|
||||
/// Returns compiler version.
|
||||
pub fn rustc_version() -> &'static str {{
|
||||
pub fn rustc_version() -> &'static str {{
|
||||
\"{}\"
|
||||
}}
|
||||
", rustc_version::version()).as_bytes()).unwrap();
|
||||
}}
|
||||
", rustc_version::version()).as_bytes()).unwrap();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user