From 0680a15f7e1f6d8aa926f36c58e6267b27d1f590 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Wed, 13 Dec 2023 13:03:13 -0800 Subject: [PATCH] Make DataPayload::new_owned() no longer const --- CHANGELOG.md | 3 +++ provider/core/src/response.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58e7adb376d..1beaac8c7d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ - Components - `icu_properties` - Add `Aran` script code (https://github.com/unicode-org/icu4x/pull/4426) +- Data model and providers + - `icu_provider` + - (Small breakage) `DataPayload::new_owned()` is no longer `const`, this was a mistake (https://github.com/unicode-org/icu4x/pull/4255) - FFI: - All languages - Correctly handle invalid UTF8 (https://github.com/unicode-org/icu4x/pull/4353) diff --git a/provider/core/src/response.rs b/provider/core/src/response.rs index 09b11830fa5..84af08483be 100644 --- a/provider/core/src/response.rs +++ b/provider/core/src/response.rs @@ -194,7 +194,7 @@ where /// assert_eq!(payload.get(), &local_struct); /// ``` #[inline] - pub const fn from_owned(data: M::Yokeable) -> Self { + pub fn from_owned(data: M::Yokeable) -> Self { Self(DataPayloadInner::Yoke(Yoke::new_owned(data))) }