@@ -33,8 +33,8 @@ use crate::{
3333 IterNextIterable , Iterable , PyComparisonOp , Unconstructible , Unhashable ,
3434 } ,
3535 utils:: Either ,
36- AsObject , PyContext , PyObject , PyObjectRef , PyObjectView , PyObjectWrap , PyRef , PyResult ,
37- PyValue , TryFromBorrowedObject , TryFromObject , VirtualMachine ,
36+ AsObject , PyContext , PyObject , PyObjectRef , PyObjectView , PyRef , PyResult , PyValue ,
37+ TryFromBorrowedObject , TryFromObject , VirtualMachine ,
3838} ;
3939use bstr:: ByteSlice ;
4040use std:: { borrow:: Cow , mem:: size_of} ;
@@ -751,7 +751,7 @@ static BUFFER_METHODS: BufferMethods = BufferMethods {
751751impl AsBuffer for PyByteArray {
752752 fn as_buffer ( zelf : & PyObjectView < Self > , _vm : & VirtualMachine ) -> PyResult < PyBuffer > {
753753 Ok ( PyBuffer :: new (
754- zelf. to_owned ( ) . into_object ( ) ,
754+ zelf. to_owned ( ) . into ( ) ,
755755 BufferDescriptor :: simple ( zelf. len ( ) , false ) ,
756756 & BUFFER_METHODS ,
757757 ) )
@@ -789,12 +789,12 @@ impl PyByteArray {
789789 Self :: sequence_downcast ( seq)
790790 . inner ( )
791791 . concat ( other, vm)
792- . map ( |x| PyByteArray :: from ( x) . into_object ( vm) )
792+ . map ( |x| PyByteArray :: from ( x) . into_pyobject ( vm) )
793793 } ) ,
794794 repeat : Some ( |seq, n, vm| {
795795 Self :: sequence_downcast ( seq)
796796 . mul ( n as isize , vm)
797- . map ( |x| x. into_object ( vm) )
797+ . map ( |x| x. into_pyobject ( vm) )
798798 } ) ,
799799 item : Some ( |seq, i, vm| {
800800 Self :: sequence_downcast ( seq)
@@ -833,7 +833,7 @@ impl Iterable for PyByteArray {
833833 Ok ( PyByteArrayIterator {
834834 internal : PyMutex :: new ( PositionIterInternal :: new ( zelf, 0 ) ) ,
835835 }
836- . into_object ( vm) )
836+ . into_pyobject ( vm) )
837837 }
838838}
839839
0 commit comments