From: Mike Hommey Date: Tue, 19 Dec 2023 23:47:32 +0000 (+0900) Subject: Allow to build oxilangtag-ffi with rustc < 1.65 X-Git-Tag: archive/raspbian/115.9.1esr-1_deb12u1+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ea37b7c82ad5c73e074239a241d3fc93a0f8bcb2;p=firefox-esr.git Allow to build oxilangtag-ffi with rustc < 1.65 Gbp-Pq: Topic debian-hacks Gbp-Pq: Name Allow-to-build-oxilangtag-ffi-with-rustc-1.65.patch --- diff --git a/intl/locale/rust/oxilangtag-ffi/src/lib.rs b/intl/locale/rust/oxilangtag-ffi/src/lib.rs index 5a30e9b77f4..e647fb0ae60 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; };