Skip to content

Commit 17458e1

Browse files
committed
Rename Value generics from T -> V
1 parent e21a8f5 commit 17458e1

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

  • crates/stackable-operator/src/kvp

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ where
9292
/// - <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/>
9393
/// - <https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/>
9494
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
95-
pub struct KeyValuePair<T>
95+
pub struct KeyValuePair<V>
9696
where
97-
T: Value,
97+
V: Value,
9898
{
9999
pub key: Key,
100-
pub value: T,
100+
pub value: V,
101101
}
102102

103103
impl<V> TryFrom<(&str, &str)> for KeyValuePair<V>
@@ -119,13 +119,13 @@ impl<V: Value> From<KeyValuePair<V>> for (Key, V) {
119119
}
120120
}
121121

122-
impl<T: Value> Display for KeyValuePair<T> {
122+
impl<V: Value> Display for KeyValuePair<V> {
123123
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
124124
write!(f, "{}={}", self.key, self.value)
125125
}
126126
}
127127

128-
impl<T: Value + Debug> Debug for KeyValuePair<T> {
128+
impl<V: Value + Debug> Debug for KeyValuePair<V> {
129129
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
130130
write!(f, "{:?}: {:?}", self.key, self.value)
131131
}
@@ -178,15 +178,15 @@ impl<V: Value> KeyValuePairsExt for KeyValuePairs<V> {
178178
}
179179
}
180180

181-
impl<'a, T: Value> TryFromIterator<(&'a str, &'a str)> for KeyValuePairs<T> {
182-
type Error = KeyValuePairError<T::Error>;
181+
impl<'a, V: Value> TryFromIterator<(&'a str, &'a str)> for KeyValuePairs<V> {
182+
type Error = KeyValuePairError<V::Error>;
183183

184184
fn try_from_iter<I: IntoIterator<Item = (&'a str, &'a str)>>(
185185
iter: I,
186186
) -> Result<Self, Self::Error> {
187187
iter.into_iter()
188188
.map(KeyValuePair::try_from)
189-
.collect::<Result<Self, KeyValuePairError<T::Error>>>()
189+
.collect::<Result<Self, KeyValuePairError<V::Error>>>()
190190
}
191191
}
192192

0 commit comments

Comments
 (0)