@@ -11,8 +11,8 @@ use crate::{
1111 } ,
1212 protocol:: { BufferInternal , BufferOptions , PyBuffer , PyIterReturn , PyMappingMethods } ,
1313 types:: {
14- AsBuffer , AsMapping , Callable , Comparable , Hashable , Iterable , IteratorIterable ,
15- PyComparisonOp , SlotConstructor , SlotIterator , Unconstructible ,
14+ AsBuffer , AsMapping , Callable , Comparable , Constructor , Hashable , IterNext ,
15+ IterNextIterable , Iterable , PyComparisonOp , Unconstructible ,
1616 } ,
1717 utils:: Either ,
1818 IdProtocol , PyClassImpl , PyComparisonValue , PyContext , PyObjectRef , PyRef , PyResult , PyValue ,
@@ -93,7 +93,7 @@ pub(crate) fn init(context: &PyContext) {
9393 PyBytesIterator :: extend_class ( context, & context. types . bytes_iterator_type ) ;
9494}
9595
96- impl SlotConstructor for PyBytes {
96+ impl Constructor for PyBytes {
9797 type Args = ByteInnerNewOptions ;
9898
9999 fn py_new ( cls : PyTypeRef , options : Self :: Args , vm : & VirtualMachine ) -> PyResult {
@@ -109,7 +109,7 @@ impl PyBytes {
109109
110110#[ pyimpl(
111111 flags( BASETYPE ) ,
112- with( AsMapping , Hashable , Comparable , AsBuffer , Iterable , SlotConstructor )
112+ with( AsMapping , Hashable , Comparable , AsBuffer , Iterable , Constructor )
113113) ]
114114impl PyBytes {
115115 #[ pymethod( magic) ]
@@ -649,7 +649,7 @@ impl PyValue for PyBytesIterator {
649649 }
650650}
651651
652- #[ pyimpl( with( SlotConstructor , SlotIterator ) ) ]
652+ #[ pyimpl( with( Constructor , IterNext ) ) ]
653653impl PyBytesIterator {
654654 #[ pymethod( magic) ]
655655 fn length_hint ( & self ) -> usize {
@@ -672,8 +672,8 @@ impl PyBytesIterator {
672672}
673673impl Unconstructible for PyBytesIterator { }
674674
675- impl IteratorIterable for PyBytesIterator { }
676- impl SlotIterator for PyBytesIterator {
675+ impl IterNextIterable for PyBytesIterator { }
676+ impl IterNext for PyBytesIterator {
677677 fn next ( zelf : & PyRef < Self > , vm : & VirtualMachine ) -> PyResult < PyIterReturn > {
678678 zelf. internal . lock ( ) . next ( |bytes, pos| {
679679 Ok ( match bytes. as_bytes ( ) . get ( pos) {
0 commit comments