From 0862bc791389eb37cf2f5a1169f131a800d01b7e Mon Sep 17 00:00:00 2001 From: Serhii Potapov Date: Sat, 4 Jan 2025 16:06:47 +0100 Subject: [PATCH] Remove faliible ::new() constuctor --- CHANGELOG.md | 3 ++- nutype_macros/src/common/gen/mod.rs | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9a662d..9a3d037 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### v0.x.x - 2025-xx-xx -* **[FEATURE]** Ability to instantiate types in `const` context, when declared with `const_fn` flag. +- **[FEATURE]** Ability to instantiate types in `const` context, when declared with `const_fn` flag. +- **[BREAKING]** Fallible `::new()` constructor is removed (was deprecated in 0.4.3). ### v0.5.1 - 2024-12-20 diff --git a/nutype_macros/src/common/gen/mod.rs b/nutype_macros/src/common/gen/mod.rs index 5bd3c22..c5accd7 100644 --- a/nutype_macros/src/common/gen/mod.rs +++ b/nutype_macros/src/common/gen/mod.rs @@ -316,12 +316,6 @@ pub trait GenerateNewtype { // scope imported with `use super::*`. #fn_sanitize #fn_validate - - // TODO: Remove in 0.5.0 - #[deprecated(since="0.4.3", note="\nUse `try_new` instead.")] - pub fn new(raw_value: #input_type) -> ::core::result::Result { - Self::try_new(raw_value) - } } ) }