diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-23 23:27:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-23 23:27:58 +0100 |
commit | 275dee60e71225a9c6c4b3b4ea7ffe4c6ecb4d87 (patch) | |
tree | 13ed3ab7e825a81085e8dcc5efeee417416b86cf /cli/build.rs | |
parent | edab8f2fd48efddc19eb0032955fee4b5dbf76e6 (diff) |
refactor: make version and user_agent &'static str (#18400)
These caused a bunch of unnecessary allocations on each startup.
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/build.rs b/cli/build.rs index a4f8ee92d..bcf5a0a38 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -459,6 +459,10 @@ fn main() { println!("cargo:rustc-env=GIT_COMMIT_HASH={}", git_commit_hash()); println!("cargo:rerun-if-env-changed=GIT_COMMIT_HASH"); + println!( + "cargo:rustc-env=GIT_COMMIT_HASH_SHORT={}", + &git_commit_hash()[..7] + ); let ts_version = ts::version(); debug_assert_eq!(ts_version, "5.0.2"); // bump this assertion when it changes |