File tree 2 files changed +5
-8
lines changed
crates/stackable-operator/src/kvp
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,10 @@ impl Display for Key {
109
109
}
110
110
}
111
111
112
- impl From < & Key > for String {
112
+ // Allows SNAFU context selectors to clone the key implicitly
113
+ impl From < & Key > for Key {
113
114
fn from ( value : & Key ) -> Self {
114
- value. to_string ( )
115
+ value. clone ( )
115
116
}
116
117
}
117
118
Original file line number Diff line number Diff line change 38
38
InvalidKey { source : KeyError , key : String } ,
39
39
40
40
/// Indicates that the value failed to parse.
41
- #[ snafu( display( "failed to parse value {value:?} of key {key:?}" ) ) ]
42
- InvalidValue {
43
- source : E ,
44
- key : String ,
45
- value : String ,
46
- } ,
41
+ #[ snafu( display( "failed to parse value {value:?} for key {key:?}" , key = key. to_string( ) ) ) ]
42
+ InvalidValue { source : E , key : Key , value : String } ,
47
43
}
48
44
49
45
/// A validated Kubernetes key/value pair.
You can’t perform that action at this time.
0 commit comments