Skip to content

Commit 19808b4

Browse files
bors[bot]nightkr
andauthored
Merge #335
335: Fix Rust 1.59 warnings r=teozkr a=teozkr ## Description ## Review Checklist - [ ] Code contains useful comments - [ ] (Integration-)Test cases added (or not applicable) - [ ] Documentation added (or not applicable) - [ ] Changelog updated (or not applicable) Co-authored-by: Teo Klestrup Röijezon <[email protected]>
2 parents f599543 + 544bc8e commit 19808b4

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

src/builder.rs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,9 +1566,7 @@ mod tests {
15661566
use k8s_openapi::apimachinery::pkg::apis::meta::v1::{
15671567
LabelSelector, LabelSelectorRequirement, OwnerReference,
15681568
};
1569-
use std::array::IntoIter;
15701569
use std::collections::BTreeMap;
1571-
use std::iter::FromIterator;
15721570

15731571
#[test]
15741572
fn test_security_context_builder() {
@@ -1653,15 +1651,21 @@ mod tests {
16531651
let container_port_1: i32 = 20000;
16541652
let container_port_name_1 = "bar_port_name";
16551653
let resources = ResourceRequirements {
1656-
limits: Some(BTreeMap::from_iter(IntoIter::new([
1657-
("cpu".to_string(), Quantity("3000m".to_string())),
1658-
("memory".to_string(), Quantity("6Gi".to_string())),
1659-
("nvidia.com/gpu".to_string(), Quantity("1".to_string())),
1660-
]))),
1661-
requests: Some(BTreeMap::from_iter(IntoIter::new([
1662-
("cpu".to_string(), Quantity("2000m".to_string())),
1663-
("memory".to_string(), Quantity("4Gi".to_string())),
1664-
]))),
1654+
limits: Some(
1655+
[
1656+
("cpu".to_string(), Quantity("3000m".to_string())),
1657+
("memory".to_string(), Quantity("6Gi".to_string())),
1658+
("nvidia.com/gpu".to_string(), Quantity("1".to_string())),
1659+
]
1660+
.into(),
1661+
),
1662+
requests: Some(
1663+
[
1664+
("cpu".to_string(), Quantity("2000m".to_string())),
1665+
("memory".to_string(), Quantity("4Gi".to_string())),
1666+
]
1667+
.into(),
1668+
),
16651669
};
16661670

16671671
let container = ContainerBuilder::new("testcontainer")

src/product_config_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,11 @@ mod tests {
484484
macro_rules! collection {
485485
// map-like
486486
($($k:expr => $v:expr),* $(,)?) => {
487-
std::iter::Iterator::collect(std::array::IntoIter::new([$(($k, $v),)*]))
487+
[$(($k, $v),)*].into()
488488
};
489489
// set-like
490490
($($v:expr),* $(,)?) => {
491-
std::iter::Iterator::collect(std::array::IntoIter::new([$($v,)*]))
491+
[$($v,)*].into()
492492
};
493493
}
494494

0 commit comments

Comments
 (0)