@@ -1566,9 +1566,7 @@ mod tests {
1566
1566
use k8s_openapi:: apimachinery:: pkg:: apis:: meta:: v1:: {
1567
1567
LabelSelector , LabelSelectorRequirement , OwnerReference ,
1568
1568
} ;
1569
- use std:: array:: IntoIter ;
1570
1569
use std:: collections:: BTreeMap ;
1571
- use std:: iter:: FromIterator ;
1572
1570
1573
1571
#[ test]
1574
1572
fn test_security_context_builder ( ) {
@@ -1653,15 +1651,21 @@ mod tests {
1653
1651
let container_port_1: i32 = 20000 ;
1654
1652
let container_port_name_1 = "bar_port_name" ;
1655
1653
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
+ ) ,
1665
1669
} ;
1666
1670
1667
1671
let container = ContainerBuilder :: new ( "testcontainer" )
0 commit comments