diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 71c003344..7f54726ef 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,11 +4,17 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed + +- [v2] Don't require the `attributed_string_type` macro caller to have `std::str::FromStr` in scope ([#1244]). + +[#1244]: https://github.com/stackabletech/operator-rs/pull/1244 + ## [0.113.2] - 2026-07-07 ### Added -- Add `raw_object_schema` to v2 `JsonConfigOverrides` ([#1242]). +- [v2] Add `raw_object_schema` to `JsonConfigOverrides` ([#1242]). [#1242]: https://github.com/stackabletech/operator-rs/pull/1242 diff --git a/crates/stackable-operator/src/v2/builder/pod/container.rs b/crates/stackable-operator/src/v2/builder/pod/container.rs index 5698acaaf..ff2e529c8 100644 --- a/crates/stackable-operator/src/v2/builder/pod/container.rs +++ b/crates/stackable-operator/src/v2/builder/pod/container.rs @@ -1,7 +1,4 @@ -use std::{ - collections::{BTreeMap, btree_map}, - str::FromStr, -}; +use std::collections::{BTreeMap, btree_map}; use snafu::Snafu; use strum::{EnumDiscriminants, IntoStaticStr}; diff --git a/crates/stackable-operator/src/v2/macros/attributed_string_type.rs b/crates/stackable-operator/src/v2/macros/attributed_string_type.rs index b2db53d91..e3cfbd689 100644 --- a/crates/stackable-operator/src/v2/macros/attributed_string_type.rs +++ b/crates/stackable-operator/src/v2/macros/attributed_string_type.rs @@ -150,7 +150,7 @@ macro_rules! attributed_string_type { D: serde::Deserializer<'de>, { let string: String = serde::Deserialize::deserialize(deserializer)?; - $name::from_str(&string).map_err(|err| serde::de::Error::custom(&err)) + <$name as std::str::FromStr>::from_str(&string).map_err(|err| serde::de::Error::custom(&err)) } } diff --git a/crates/stackable-operator/src/v2/types/kubernetes.rs b/crates/stackable-operator/src/v2/types/kubernetes.rs index 65c0dcbab..df2f0ce4e 100644 --- a/crates/stackable-operator/src/v2/types/kubernetes.rs +++ b/crates/stackable-operator/src/v2/types/kubernetes.rs @@ -1,6 +1,4 @@ //! Kubernetes (resource) names -use std::str::FromStr; - use crate::{ attributed_string_type, validation::{RFC_1123_LABEL_MAX_LENGTH, RFC_1123_SUBDOMAIN_MAX_LENGTH}, diff --git a/crates/stackable-operator/src/v2/types/operator.rs b/crates/stackable-operator/src/v2/types/operator.rs index eb6ec22bc..e5e47ec0b 100644 --- a/crates/stackable-operator/src/v2/types/operator.rs +++ b/crates/stackable-operator/src/v2/types/operator.rs @@ -1,7 +1,5 @@ //! Names for operators -use std::str::FromStr; - use crate::attributed_string_type; attributed_string_type! {