@@ -85,7 +85,7 @@ impl ZstdCompressionChunker {
8585
8686 let source = make_in_buffer_source ( py, data, zstd_safe:: CCtx :: in_size ( ) ) ?;
8787
88- let it = Py :: new (
88+ let it = Bound :: new (
8989 py,
9090 ZstdCompressionChunkerIterator {
9191 cctx : self . cctx . clone ( ) ,
@@ -96,9 +96,9 @@ impl ZstdCompressionChunker {
9696 } ,
9797 ) ?;
9898
99- self . iterator = Some ( it. clone ( ) ) ;
99+ self . iterator = Some ( it. clone ( ) . unbind ( ) ) ;
100100
101- Ok ( it)
101+ Ok ( it. unbind ( ) )
102102 }
103103
104104 fn flush < ' p > ( & mut self , py : Python < ' p > ) -> PyResult < Py < ZstdCompressionChunkerIterator > > {
@@ -119,7 +119,7 @@ impl ZstdCompressionChunker {
119119 let source =
120120 make_in_buffer_source ( py, & PyBytes :: new_bound ( py, & [ ] ) , zstd_safe:: CCtx :: in_size ( ) ) ?;
121121
122- let it = Py :: new (
122+ let it = Bound :: new (
123123 py,
124124 ZstdCompressionChunkerIterator {
125125 cctx : self . cctx . clone ( ) ,
@@ -130,9 +130,9 @@ impl ZstdCompressionChunker {
130130 } ,
131131 ) ?;
132132
133- self . iterator = Some ( it. clone ( ) ) ;
133+ self . iterator = Some ( it. clone ( ) . unbind ( ) ) ;
134134
135- Ok ( it)
135+ Ok ( it. unbind ( ) )
136136 }
137137
138138 fn finish < ' p > ( & mut self , py : Python < ' p > ) -> PyResult < Py < ZstdCompressionChunkerIterator > > {
@@ -153,7 +153,7 @@ impl ZstdCompressionChunker {
153153 let source =
154154 make_in_buffer_source ( py, & PyBytes :: new_bound ( py, & [ ] ) , zstd_safe:: CCtx :: in_size ( ) ) ?;
155155
156- let it = Py :: new (
156+ let it = Bound :: new (
157157 py,
158158 ZstdCompressionChunkerIterator {
159159 cctx : self . cctx . clone ( ) ,
@@ -164,9 +164,9 @@ impl ZstdCompressionChunker {
164164 } ,
165165 ) ?;
166166
167- self . iterator = Some ( it. clone ( ) ) ;
167+ self . iterator = Some ( it. clone ( ) . unbind ( ) ) ;
168168
169- Ok ( it)
169+ Ok ( it. unbind ( ) )
170170 }
171171}
172172
0 commit comments