@@ -277,8 +277,8 @@ impl SimpleSeq for std::collections::VecDeque<PyObjectRef> {
277
277
278
278
pub fn seq_equal (
279
279
vm : & VirtualMachine ,
280
- zelf : & dyn SimpleSeq ,
281
- other : & dyn SimpleSeq ,
280
+ zelf : & impl SimpleSeq ,
281
+ other : & impl SimpleSeq ,
282
282
) -> PyResult < bool > {
283
283
if zelf. len ( ) == other. len ( ) {
284
284
for ( a, b) in Iterator :: zip ( zelf. iter ( ) , other. iter ( ) ) {
@@ -295,7 +295,11 @@ pub fn seq_equal(
295
295
}
296
296
}
297
297
298
- pub fn seq_lt ( vm : & VirtualMachine , zelf : & dyn SimpleSeq , other : & dyn SimpleSeq ) -> PyResult < bool > {
298
+ pub fn seq_lt (
299
+ vm : & VirtualMachine ,
300
+ zelf : & impl SimpleSeq ,
301
+ other : & impl SimpleSeq ,
302
+ ) -> PyResult < bool > {
299
303
for ( a, b) in Iterator :: zip ( zelf. iter ( ) , other. iter ( ) ) {
300
304
if let Some ( v) = vm. bool_seq_lt ( a. clone ( ) , b. clone ( ) ) ? {
301
305
return Ok ( v) ;
@@ -304,7 +308,11 @@ pub fn seq_lt(vm: &VirtualMachine, zelf: &dyn SimpleSeq, other: &dyn SimpleSeq)
304
308
Ok ( zelf. len ( ) < other. len ( ) )
305
309
}
306
310
307
- pub fn seq_gt ( vm : & VirtualMachine , zelf : & dyn SimpleSeq , other : & dyn SimpleSeq ) -> PyResult < bool > {
311
+ pub fn seq_gt (
312
+ vm : & VirtualMachine ,
313
+ zelf : & impl SimpleSeq ,
314
+ other : & impl SimpleSeq ,
315
+ ) -> PyResult < bool > {
308
316
for ( a, b) in Iterator :: zip ( zelf. iter ( ) , other. iter ( ) ) {
309
317
if let Some ( v) = vm. bool_seq_gt ( a. clone ( ) , b. clone ( ) ) ? {
310
318
return Ok ( v) ;
@@ -313,7 +321,11 @@ pub fn seq_gt(vm: &VirtualMachine, zelf: &dyn SimpleSeq, other: &dyn SimpleSeq)
313
321
Ok ( zelf. len ( ) > other. len ( ) )
314
322
}
315
323
316
- pub fn seq_ge ( vm : & VirtualMachine , zelf : & dyn SimpleSeq , other : & dyn SimpleSeq ) -> PyResult < bool > {
324
+ pub fn seq_ge (
325
+ vm : & VirtualMachine ,
326
+ zelf : & impl SimpleSeq ,
327
+ other : & impl SimpleSeq ,
328
+ ) -> PyResult < bool > {
317
329
for ( a, b) in Iterator :: zip ( zelf. iter ( ) , other. iter ( ) ) {
318
330
if let Some ( v) = vm. bool_seq_gt ( a. clone ( ) , b. clone ( ) ) ? {
319
331
return Ok ( v) ;
@@ -323,7 +335,11 @@ pub fn seq_ge(vm: &VirtualMachine, zelf: &dyn SimpleSeq, other: &dyn SimpleSeq)
323
335
Ok ( zelf. len ( ) >= other. len ( ) )
324
336
}
325
337
326
- pub fn seq_le ( vm : & VirtualMachine , zelf : & dyn SimpleSeq , other : & dyn SimpleSeq ) -> PyResult < bool > {
338
+ pub fn seq_le (
339
+ vm : & VirtualMachine ,
340
+ zelf : & impl SimpleSeq ,
341
+ other : & impl SimpleSeq ,
342
+ ) -> PyResult < bool > {
327
343
for ( a, b) in Iterator :: zip ( zelf. iter ( ) , other. iter ( ) ) {
328
344
if let Some ( v) = vm. bool_seq_lt ( a. clone ( ) , b. clone ( ) ) ? {
329
345
return Ok ( v) ;
@@ -365,7 +381,7 @@ impl<'a> Iterator for SeqMul<'a> {
365
381
}
366
382
impl ExactSizeIterator for SeqMul < ' _ > { }
367
383
368
- pub fn seq_mul ( seq : & dyn SimpleSeq , repetitions : isize ) -> SeqMul {
384
+ pub fn seq_mul ( seq : & impl SimpleSeq , repetitions : isize ) -> SeqMul {
369
385
SeqMul {
370
386
seq,
371
387
repetitions : repetitions. max ( 0 ) as usize ,
0 commit comments