From 6c81f1fb7489ab5c2ff3205e4003f80c68346add Mon Sep 17 00:00:00 2001 From: arkpar Date: Thu, 17 Mar 2016 18:41:55 +0100 Subject: [PATCH] Prettier version wo git dir; Use rustc compile time version --- util/build.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util/build.rs b/util/build.rs index 1ec89f704..f033e52e0 100644 --- a/util/build.rs +++ b/util/build.rs @@ -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(); }