Skip to content

Commit de636c0

Browse files
Fix cyclic call in IntoIterator for EnvVarSet
1 parent fc4197e commit de636c0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

crates/stackable-operator/src/v2/builder/pod/container.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,13 @@ impl<'a> From<&'a EnvVarSet> for Vec<&'a EnvVar> {
190190
value.into_iter().collect()
191191
}
192192
}
193+
193194
impl From<EnvVarSet> for Vec<EnvVar> {
194195
fn from(value: EnvVarSet) -> Self {
195196
value.into_iter().collect()
196197
}
197198
}
199+
198200
impl<'a> IntoIterator for &'a EnvVarSet {
199201
type IntoIter = vec::IntoIter<Self::Item>;
200202
type Item = &'a EnvVar;
@@ -215,7 +217,7 @@ impl IntoIterator for EnvVarSet {
215217
type Item = EnvVar;
216218

217219
fn into_iter(self) -> Self::IntoIter {
218-
Vec::from(self).into_iter()
220+
(&self).into_iter().cloned().collect::<Vec<_>>().into_iter()
219221
}
220222
}
221223

0 commit comments

Comments
 (0)