From 8956d9050c9eeb00d99e4e5ea02073ff7829e91f Mon Sep 17 00:00:00 2001 From: Skye Date: Mon, 5 Feb 2024 21:22:44 +0900 Subject: [PATCH 1/2] Mark `BidiClassAdapter::new` as `const` --- components/properties/src/bidi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/properties/src/bidi.rs b/components/properties/src/bidi.rs index ecbd6e74edc..5a4a901d189 100644 --- a/components/properties/src/bidi.rs +++ b/components/properties/src/bidi.rs @@ -81,7 +81,7 @@ pub struct BidiClassAdapter<'a> { impl<'a> BidiClassAdapter<'a> { /// Creates new instance of `BidiClassAdapter`. - pub fn new(data: CodePointMapDataBorrowed<'a, BidiClass>) -> BidiClassAdapter<'a> { + pub const fn new(data: CodePointMapDataBorrowed<'a, BidiClass>) -> BidiClassAdapter<'a> { BidiClassAdapter { data } } } From 15e215146d94f2438733fc968f063c69585f1994 Mon Sep 17 00:00:00 2001 From: Robert Bastian <4706271+robertbastian@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:19:35 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bf9d475f1c..7ad38b3fcc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - `FormattedDateTime` and `FormattedZonedDateTime` now implement `Clone` and `Copy` (https://github.com/unicode-org/icu4x/pull/4476) - `icu_properties` - Add `Aran` script code (https://github.com/unicode-org/icu4x/pull/4426) + - Mark `BidiClassAdapter::new` as const (https://github.com/unicode-org/icu4x/pull/4584) - `icu_segmenter` - Fix Unicode 15.0 line breaking (https://github.com/unicode-org/icu4x/pull/4389) - Data model and providers