Prevent build.rs rerunning unnecessarily on all source changes

This commit is contained in:
David Tolnay committed 2022-12-12 14:37:41 -08:00
1 parent d493649f52
commit 4f157a8b81
5 files changed
+11

No files matched your search

+2
View File
@@ -6,6 +6,8 @@ use std::str::{self, FromStr};
// 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,