summaryrefslogtreecommitdiffstats
path: root/vendor/icu_provider_adapters/src/helpers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/icu_provider_adapters/src/helpers.rs')
-rw-r--r--vendor/icu_provider_adapters/src/helpers.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/icu_provider_adapters/src/helpers.rs b/vendor/icu_provider_adapters/src/helpers.rs
new file mode 100644
index 000000000..2b168f936
--- /dev/null
+++ b/vendor/icu_provider_adapters/src/helpers.rs
@@ -0,0 +1,15 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+use icu_provider::prelude::*;
+
+pub(crate) fn result_is_err_missing_data_options<T>(result: &Result<T, DataError>) -> bool {
+ matches!(
+ result,
+ Err(DataError {
+ kind: DataErrorKind::MissingLocale,
+ ..
+ })
+ )
+}