Prevent build.rs rerunning unnecessarily on all source changes

This commit is contained in:
David Tolnay
2022-12-12 14:37:41 -08:00
parent d493649f52
commit 4f157a8b81
5 changed files with 11 additions and 0 deletions
+2
View File
@@ -6,6 +6,8 @@ use std::str;
// opening a GitHub issue if your build environment requires some way to enable
// these cfgs other than by executing our build script.
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let minor = match rustc_minor_version() {
Some(minor) => minor,
None => return,