File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -477,7 +477,7 @@ impl PyList {
477477 . collect ( ) ;
478478 return Ok ( vm. ctx . new_list ( new_elements) ) ;
479479 }
480- return Err ( vm. new_memory_error ( "" . to_owned ( ) ) ) ;
480+ Err ( vm. new_memory_error ( "" . to_owned ( ) ) )
481481 }
482482
483483 #[ pymethod( name = "__rmul__" ) ]
@@ -486,15 +486,15 @@ impl PyList {
486486 }
487487
488488 #[ pymethod( name = "__imul__" ) ]
489- fn imul ( zelf : PyRef < Self > , counter : isize ) -> PyResult < Self > {
489+ fn imul ( zelf : PyRef < Self > , counter : isize , vm : & VirtualMachine ) -> PyResult < PyRef < Self > > {
490490 if counter < 0 || zelf. len ( ) * ( counter as usize ) < MAX_MEMORY_SIZE {
491491 let new_elements = sequence:: seq_mul ( & zelf. borrow_sequence ( ) , counter)
492492 . cloned ( )
493493 . collect ( ) ;
494494 zelf. elements . replace ( new_elements) ;
495- return Ok ( * zelf) ;
495+ return Ok ( zelf) ;
496496 }
497- return Err ( vm. new_memory_error ( "" . to_owned ( ) ) ) ;
497+ Err ( vm. new_memory_error ( "" . to_owned ( ) ) )
498498 }
499499
500500 #[ pymethod]
Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ impl PyString {
337337 vm. new_overflow_error ( "cannot fit 'int' into an index-sized integer" . to_owned ( ) )
338338 } ) ;
339339 }
340- return Err ( vm. new_memory_error ( "" . to_owned ( ) ) ) ;
340+ Err ( vm. new_memory_error ( "" . to_owned ( ) ) )
341341 }
342342
343343 #[ pymethod( name = "__rmul__" ) ]
You can’t perform that action at this time.
0 commit comments