From 2e188b0a46019f9e5f69cd4148913d123277e89b Mon Sep 17 00:00:00 2001 From: Skye Date: Tue, 6 Feb 2024 00:23:20 +0900 Subject: [PATCH] Mark `BidiClassAdapter::new` as `const` (#4584) --- CHANGELOG.md | 1 + components/properties/src/bidi.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 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 } } }