Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Jun 26, 2023
1 parent 31890b5 commit a73dcae
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 127 deletions.
20 changes: 11 additions & 9 deletions components/properties/src/exemplar_chars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! use icu::properties::exemplar_chars;
//!
//! let locale = locale!("en-001").into();
//! let data = exemplar_chars::exemplars_main(&locale);
//! let data = exemplar_chars::exemplars_main(&locale).expect("locale should be present");
//! let exemplars_main = data.as_borrowed();
//!
//! assert!(exemplars_main.contains_char('a'));
Expand All @@ -46,9 +46,6 @@ macro_rules! make_exemplar_chars_unicode_set_property {
$vis2:vis fn $constname:ident();
) => {
#[doc = concat!("[`", stringify!($constname), "()`] with a runtime data provider argument.")]
///
/// Note that this will return an owned version of the data. Functionality is available on
/// the borrowed version, accessible through `.as_borrowed()`.
$vis fn $funcname(
provider: &(impl DataProvider<$keyed_data_marker> + ?Sized),
locale: &DataLocale,
Expand Down Expand Up @@ -96,7 +93,8 @@ make_exemplar_chars_unicode_set_property!(
/// use icu::locid::locale;
/// use icu::properties::exemplar_chars;
///
/// let data = exemplar_chars::exemplars_main(&locale!("en").into());
/// let data = exemplar_chars::exemplars_main(&locale!("en").into())
/// .expect("locale should be present");
/// let exemplars_main = data.as_borrowed();
///
/// assert!(exemplars_main.contains_char('a'));
Expand Down Expand Up @@ -124,7 +122,8 @@ make_exemplar_chars_unicode_set_property!(
/// use icu::properties::exemplar_chars;
///
/// let data =
/// exemplar_chars::exemplars_auxiliary(&locale!("en").into());
/// exemplar_chars::exemplars_auxiliary(&locale!("en").into())
/// .expect("locale should be present");
/// let exemplars_auxiliary = data.as_borrowed();
///
/// assert!(!exemplars_auxiliary.contains_char('a'));
Expand Down Expand Up @@ -152,7 +151,8 @@ make_exemplar_chars_unicode_set_property!(
/// use icu::properties::exemplar_chars;
///
/// let data =
/// exemplar_chars::exemplars_punctuation(&locale!("en").into());
/// exemplar_chars::exemplars_punctuation(&locale!("en").into())
/// .expect("locale should be present");
/// let exemplars_punctuation = data.as_borrowed();
///
/// assert!(!exemplars_punctuation.contains_char('0'));
Expand Down Expand Up @@ -181,7 +181,8 @@ make_exemplar_chars_unicode_set_property!(
/// use icu::properties::exemplar_chars;
///
/// let data =
/// exemplar_chars::exemplars_numbers(&locale!("en").into());
/// exemplar_chars::exemplars_numbers(&locale!("en").into())
/// .expect("locale should be present");
/// let exemplars_numbers = data.as_borrowed();
///
/// assert!(exemplars_numbers.contains_char('0'));
Expand Down Expand Up @@ -210,7 +211,8 @@ make_exemplar_chars_unicode_set_property!(
/// use icu::properties::exemplar_chars;
///
/// let data =
/// exemplar_chars::exemplars_index(&locale!("en").into());
/// exemplar_chars::exemplars_index(&locale!("en").into())
/// .expect("locale should be present");
/// let exemplars_index = data.as_borrowed();
///
/// assert!(!exemplars_index.contains_char('a'));
Expand Down
2 changes: 1 addition & 1 deletion components/properties/src/maps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ macro_rules! make_map_property {
) => {
#[doc = concat!("[`", stringify!($constname), "()`] with a runtime data provider argument.")]
///
/// Note that this will return an owned version of the data. Functionality is available on
/// Note that this will return an owned version of the data. Functionality is available on
/// the borrowed version, accessible through `.as_borrowed()`.
$vis fn $name(
provider: &(impl DataProvider<$keyed_data_marker> + ?Sized)
Expand Down
Loading

0 comments on commit a73dcae

Please sign in to comment.