We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d62fc7 commit f102e4dCopy full SHA for f102e4d
1 file changed
crates/stackable-operator/src/kvp/mod.rs
@@ -152,8 +152,8 @@ where
152
153
#[derive(Debug, PartialEq, Snafu)]
154
pub enum KeyValuePairsError {
155
- #[snafu(display("key/value pair already exists"))]
156
- PairAlreadyExists,
+ #[snafu(display("key already exists"))]
+ KeyAlreadyExists,
157
}
158
159
/// A validated set/list of Kubernetes key/value pairs.
@@ -304,7 +304,7 @@ where
304
/// If the list already had this key present, nothing is updated, and an
305
/// error is returned.
306
pub fn try_insert(&mut self, kvp: KeyValuePair<T>) -> Result<(), KeyValuePairsError> {
307
- ensure!(!self.0.contains_key(&kvp.key), PairAlreadyExistsSnafu);
+ ensure!(!self.0.contains_key(&kvp.key), KeyAlreadyExistsSnafu);
308
self.insert(kvp);
309
Ok(())
310
0 commit comments