Blame 0002-update-version_check.patch

7a922e9
From 90597abf88a2be1ade1f9e1914daaa982d705d11 Mon Sep 17 00:00:00 2001
7a922e9
From: Sean McArthur <sean@seanmonstar.com>
7a922e9
Date: Tue, 12 Nov 2019 11:20:08 -0800
7a922e9
Subject: [PATCH 2/2] update version_check
7a922e9
7a922e9
(cherry picked from commit 4788cba472f5fd5291cd6f0a3e564ee2ca502e04)
7a922e9
---
7a922e9
 build.rs | 8 ++++++--
7a922e9
 1 file changed, 6 insertions(+), 2 deletions(-)
7a922e9
7a922e9
diff --git a/build.rs b/build.rs
7a922e9
index 4483ec8..e62b5d3 100644
7a922e9
--- a/build.rs
7a922e9
+++ b/build.rs
7a922e9
@@ -1,10 +1,14 @@
7a922e9
 extern crate version_check as rustc;
7a922e9
 
7a922e9
 fn main() {
7a922e9
-    if rustc::is_min_version("1.5.0").map(|(is_min, _)| is_min).unwrap_or(true) {
7a922e9
+    if is_rustc_at_least("1.5.0") {
7a922e9
         println!("cargo:rustc-cfg=__unicase__iter_cmp");
7a922e9
     }
7a922e9
-    if rustc::is_min_version("1.13.0").map(|(is_min, _)| is_min).unwrap_or(true) {
7a922e9
+    if is_rustc_at_least("1.13.0") {
7a922e9
         println!("cargo:rustc-cfg=__unicase__default_hasher");
7a922e9
     }
7a922e9
 }
7a922e9
+
7a922e9
+fn is_rustc_at_least(v: &str) -> bool {
7a922e9
+    rustc::is_min_version(v).unwrap_or(true)
7a922e9
+}
7a922e9
-- 
7a922e9
2.24.0
7a922e9