@@ -56,7 +56,7 @@ impl PythonizeListType for CustomList {
5656}
5757
5858struct PythonizeCustomList ;
59- impl < ' py > PythonizeTypes for PythonizeCustomList {
59+ impl PythonizeTypes for PythonizeCustomList {
6060 type Map = PyDict ;
6161 type NamedMap = PythonizeUnnamedMappingAdapter < PyDict > ;
6262 type List = CustomList ;
@@ -103,6 +103,10 @@ impl CustomDict {
103103 fn values ( & self ) -> Vec < Py < PyAny > > {
104104 self . items . values ( ) . cloned ( ) . collect ( )
105105 }
106+
107+ fn items ( & self ) -> Vec < ( & String , Py < PyAny > ) > {
108+ self . items . iter ( ) . map ( |( k, v) | ( k, v. clone ( ) ) ) . collect ( )
109+ }
106110}
107111
108112impl PythonizeMappingType for CustomDict {
@@ -131,7 +135,7 @@ impl PythonizeMappingType for CustomDict {
131135}
132136
133137struct PythonizeCustomDict ;
134- impl < ' py > PythonizeTypes for PythonizeCustomDict {
138+ impl PythonizeTypes for PythonizeCustomDict {
135139 type Map = CustomDict ;
136140 type NamedMap = PythonizeUnnamedMappingAdapter < CustomDict > ;
137141 type List = PyTuple ;
@@ -215,6 +219,10 @@ impl NamedCustomDict {
215219 fn values ( & self ) -> Vec < Py < PyAny > > {
216220 self . items . values ( ) . cloned ( ) . collect ( )
217221 }
222+
223+ fn items ( & self ) -> Vec < ( & String , Py < PyAny > ) > {
224+ self . items . iter ( ) . map ( |( k, v) | ( k, v. clone ( ) ) ) . collect ( )
225+ }
218226}
219227
220228impl PythonizeNamedMappingType for NamedCustomDict {
@@ -248,7 +256,7 @@ impl PythonizeNamedMappingType for NamedCustomDict {
248256}
249257
250258struct PythonizeNamedCustomDict ;
251- impl < ' py > PythonizeTypes for PythonizeNamedCustomDict {
259+ impl PythonizeTypes for PythonizeNamedCustomDict {
252260 type Map = CustomDict ;
253261 type NamedMap = NamedCustomDict ;
254262 type List = PyTuple ;
0 commit comments