File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
crates/stackable-operator Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
5
5
## [ Unreleased]
6
6
7
+ ### Fix
8
+
9
+ - BREAKING: Improve ` AwsRegion::name() ` ergonomics: borrow self and return ` Option<&str> ` ([ #963 ] ).
10
+
11
+ [ #963 ] : https://github.com/stackabletech/operator-rs/pull/963
12
+
7
13
## [ 0.86.1] - 2025-02-21
8
14
9
15
### Added
Original file line number Diff line number Diff line change @@ -124,15 +124,15 @@ impl AwsRegion {
124
124
///
125
125
/// ```
126
126
/// # use stackable_operator::commons::s3::AwsRegion;
127
- /// # fn set_property(key: &str, value: String ) {}
127
+ /// # fn set_property(key: &str, value: &str ) {}
128
128
/// # fn example(aws_region: AwsRegion) {
129
129
/// if let Some(region_name) = aws_region.name() {
130
130
/// // set some property if the region is set, or is the default.
131
131
/// set_property("aws.region", region_name);
132
132
/// };
133
133
/// # }
134
134
/// ```
135
- pub fn name ( self ) -> Option < String > {
135
+ pub fn name ( & self ) -> Option < & str > {
136
136
match self {
137
137
AwsRegion :: Name ( name) => Some ( name) ,
138
138
AwsRegion :: Source ( _) => None ,
You can’t perform that action at this time.
0 commit comments