Skip to content

Commit f102e4d

Browse files
committed
Rename PairAlreadyExists => KeyAlreadyExists
1 parent 7d62fc7 commit f102e4d

File tree

1 file changed

+3
-3
lines changed
  • crates/stackable-operator/src/kvp

1 file changed

+3
-3
lines changed

crates/stackable-operator/src/kvp/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ where
152152

153153
#[derive(Debug, PartialEq, Snafu)]
154154
pub enum KeyValuePairsError {
155-
#[snafu(display("key/value pair already exists"))]
156-
PairAlreadyExists,
155+
#[snafu(display("key already exists"))]
156+
KeyAlreadyExists,
157157
}
158158

159159
/// A validated set/list of Kubernetes key/value pairs.
@@ -304,7 +304,7 @@ where
304304
/// If the list already had this key present, nothing is updated, and an
305305
/// error is returned.
306306
pub fn try_insert(&mut self, kvp: KeyValuePair<T>) -> Result<(), KeyValuePairsError> {
307-
ensure!(!self.0.contains_key(&kvp.key), PairAlreadyExistsSnafu);
307+
ensure!(!self.0.contains_key(&kvp.key), KeyAlreadyExistsSnafu);
308308
self.insert(kvp);
309309
Ok(())
310310
}

0 commit comments

Comments
 (0)