summaryrefslogtreecommitdiffstats
path: root/debian/patches/debian-hacks/Allow-to-build-oxilangtag-ffi-with-rustc-1.65.patch
blob: 5dd42994b18d7df2fec8b44eccdea1af1e001c34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Mike Hommey <mh@glandium.org>
Date: Wed, 20 Dec 2023 08:47:32 +0900
Subject: Allow to build oxilangtag-ffi with rustc < 1.65

---
 intl/locale/rust/oxilangtag-ffi/src/lib.rs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/intl/locale/rust/oxilangtag-ffi/src/lib.rs b/intl/locale/rust/oxilangtag-ffi/src/lib.rs
index 5a30e9b..e647fb0 100644
--- a/intl/locale/rust/oxilangtag-ffi/src/lib.rs
+++ b/intl/locale/rust/oxilangtag-ffi/src/lib.rs
@@ -85,7 +85,9 @@ pub extern "C" fn lang_tag_matches(attribute: *const LangTag, selector: &nsACStr
     loop {
         // 4.  When the language range's list has no more subtags, the match
         // succeeds.
-        let Some(range_subtag_str) = range_subtag else {
+        let range_subtag_str = if let Some(range_subtag_str) = range_subtag {
+            range_subtag_str
+        } else {
             return true;
         };
 
@@ -99,7 +101,9 @@ pub extern "C" fn lang_tag_matches(attribute: *const LangTag, selector: &nsACStr
 
         // B.  Else, if there are no more subtags in the language tag's
         //     list, the match fails.
-        let Some(lang_subtag_str) = lang_subtag else {
+        let lang_subtag_str = if let Some(lang_subtag_str) = lang_subtag {
+            lang_subtag_str
+        } else {
             return false;
         };