Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/stackable-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Fix

- BREAKING: Improve `AwsRegion::name()` ergonomics: borrow self and return `Option<&str>` ([#963]).

[#963]: https://github.com/stackabletech/operator-rs/pull/963

## [0.86.1] - 2025-02-21

### Added
Expand Down
4 changes: 2 additions & 2 deletions crates/stackable-operator/src/commons/s3/crd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ impl AwsRegion {
///
/// ```
/// # use stackable_operator::commons::s3::AwsRegion;
/// # fn set_property(key: &str, value: String) {}
/// # fn set_property(key: &str, value: &str) {}
/// # fn example(aws_region: AwsRegion) {
/// if let Some(region_name) = aws_region.name() {
/// // set some property if the region is set, or is the default.
/// set_property("aws.region", region_name);
/// };
/// # }
/// ```
pub fn name(self) -> Option<String> {
pub fn name(&self) -> Option<&str> {
match self {
AwsRegion::Name(name) => Some(name),
AwsRegion::Source(_) => None,
Expand Down