@@ -42,28 +42,28 @@ impl PySequenceSlots {
4242
4343 /// Copy from static PySequenceMethods
4444 pub fn copy_from ( & self , methods : & PySequenceMethods ) {
45- if let Some ( f) = methods. length . load ( ) {
45+ if let Some ( f) = methods. length {
4646 self . length . store ( Some ( f) ) ;
4747 }
48- if let Some ( f) = methods. concat . load ( ) {
48+ if let Some ( f) = methods. concat {
4949 self . concat . store ( Some ( f) ) ;
5050 }
51- if let Some ( f) = methods. repeat . load ( ) {
51+ if let Some ( f) = methods. repeat {
5252 self . repeat . store ( Some ( f) ) ;
5353 }
54- if let Some ( f) = methods. item . load ( ) {
54+ if let Some ( f) = methods. item {
5555 self . item . store ( Some ( f) ) ;
5656 }
57- if let Some ( f) = methods. ass_item . load ( ) {
57+ if let Some ( f) = methods. ass_item {
5858 self . ass_item . store ( Some ( f) ) ;
5959 }
60- if let Some ( f) = methods. contains . load ( ) {
60+ if let Some ( f) = methods. contains {
6161 self . contains . store ( Some ( f) ) ;
6262 }
63- if let Some ( f) = methods. inplace_concat . load ( ) {
63+ if let Some ( f) = methods. inplace_concat {
6464 self . inplace_concat . store ( Some ( f) ) ;
6565 }
66- if let Some ( f) = methods. inplace_repeat . load ( ) {
66+ if let Some ( f) = methods. inplace_repeat {
6767 self . inplace_repeat . store ( Some ( f) ) ;
6868 }
6969 }
@@ -72,18 +72,15 @@ impl PySequenceSlots {
7272#[ allow( clippy:: type_complexity) ]
7373#[ derive( Default ) ]
7474pub struct PySequenceMethods {
75- pub length : AtomicCell < Option < fn ( PySequence < ' _ > , & VirtualMachine ) -> PyResult < usize > > > ,
76- pub concat : AtomicCell < Option < fn ( PySequence < ' _ > , & PyObject , & VirtualMachine ) -> PyResult > > ,
77- pub repeat : AtomicCell < Option < fn ( PySequence < ' _ > , isize , & VirtualMachine ) -> PyResult > > ,
78- pub item : AtomicCell < Option < fn ( PySequence < ' _ > , isize , & VirtualMachine ) -> PyResult > > ,
79- pub ass_item : AtomicCell <
75+ pub length : Option < fn ( PySequence < ' _ > , & VirtualMachine ) -> PyResult < usize > > ,
76+ pub concat : Option < fn ( PySequence < ' _ > , & PyObject , & VirtualMachine ) -> PyResult > ,
77+ pub repeat : Option < fn ( PySequence < ' _ > , isize , & VirtualMachine ) -> PyResult > ,
78+ pub item : Option < fn ( PySequence < ' _ > , isize , & VirtualMachine ) -> PyResult > ,
79+ pub ass_item :
8080 Option < fn ( PySequence < ' _ > , isize , Option < PyObjectRef > , & VirtualMachine ) -> PyResult < ( ) > > ,
81- > ,
82- pub contains :
83- AtomicCell < Option < fn ( PySequence < ' _ > , & PyObject , & VirtualMachine ) -> PyResult < bool > > > ,
84- pub inplace_concat :
85- AtomicCell < Option < fn ( PySequence < ' _ > , & PyObject , & VirtualMachine ) -> PyResult > > ,
86- pub inplace_repeat : AtomicCell < Option < fn ( PySequence < ' _ > , isize , & VirtualMachine ) -> PyResult > > ,
81+ pub contains : Option < fn ( PySequence < ' _ > , & PyObject , & VirtualMachine ) -> PyResult < bool > > ,
82+ pub inplace_concat : Option < fn ( PySequence < ' _ > , & PyObject , & VirtualMachine ) -> PyResult > ,
83+ pub inplace_repeat : Option < fn ( PySequence < ' _ > , isize , & VirtualMachine ) -> PyResult > ,
8784}
8885
8986impl std:: fmt:: Debug for PySequenceMethods {
@@ -93,16 +90,15 @@ impl std::fmt::Debug for PySequenceMethods {
9390}
9491
9592impl PySequenceMethods {
96- #[ allow( clippy:: declare_interior_mutable_const) ]
9793 pub const NOT_IMPLEMENTED : Self = Self {
98- length : AtomicCell :: new ( None ) ,
99- concat : AtomicCell :: new ( None ) ,
100- repeat : AtomicCell :: new ( None ) ,
101- item : AtomicCell :: new ( None ) ,
102- ass_item : AtomicCell :: new ( None ) ,
103- contains : AtomicCell :: new ( None ) ,
104- inplace_concat : AtomicCell :: new ( None ) ,
105- inplace_repeat : AtomicCell :: new ( None ) ,
94+ length : None ,
95+ concat : None ,
96+ repeat : None ,
97+ item : None ,
98+ ass_item : None ,
99+ contains : None ,
100+ inplace_concat : None ,
101+ inplace_repeat : None ,
106102 } ;
107103}
108104
0 commit comments