@@ -20,8 +20,8 @@ pub struct PyAsyncGen {
2020type PyAsyncGenRef = PyRef < PyAsyncGen > ;
2121
2222impl PyValue for PyAsyncGen {
23- fn class ( vm : & VirtualMachine ) -> PyTypeRef {
24- vm. ctx . types . async_generator . clone ( )
23+ fn class ( vm : & VirtualMachine ) -> & PyTypeRef {
24+ & vm. ctx . types . async_generator
2525 }
2626}
2727
@@ -118,8 +118,8 @@ impl PyAsyncGen {
118118#[ derive( Debug ) ]
119119pub ( crate ) struct PyAsyncGenWrappedValue ( pub PyObjectRef ) ;
120120impl PyValue for PyAsyncGenWrappedValue {
121- fn class ( vm : & VirtualMachine ) -> PyTypeRef {
122- vm. ctx . types . async_generator_wrapped_value . clone ( )
121+ fn class ( vm : & VirtualMachine ) -> & PyTypeRef {
122+ & vm. ctx . types . async_generator_wrapped_value
123123 }
124124}
125125
@@ -167,8 +167,8 @@ pub(crate) struct PyAsyncGenASend {
167167}
168168
169169impl PyValue for PyAsyncGenASend {
170- fn class ( vm : & VirtualMachine ) -> PyTypeRef {
171- vm. ctx . types . async_generator_asend . clone ( )
170+ fn class ( vm : & VirtualMachine ) -> & PyTypeRef {
171+ & vm. ctx . types . async_generator_asend
172172 }
173173}
174174
@@ -263,8 +263,8 @@ pub(crate) struct PyAsyncGenAThrow {
263263}
264264
265265impl PyValue for PyAsyncGenAThrow {
266- fn class ( vm : & VirtualMachine ) -> PyTypeRef {
267- vm. ctx . types . async_generator_athrow . clone ( )
266+ fn class ( vm : & VirtualMachine ) -> & PyTypeRef {
267+ & vm. ctx . types . async_generator_athrow
268268 }
269269}
270270
0 commit comments