File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ pub enum GcStatus {
17
17
ShouldKeep ,
18
18
}
19
19
20
- #[ enum_dispatch]
21
20
pub trait GcObjPtr : GcTrace {
22
21
fn inc ( & self ) ;
23
22
fn dec ( & self ) -> GcStatus ;
@@ -28,20 +27,6 @@ pub trait GcObjPtr: GcTrace {
28
27
fn as_ptr ( & self ) -> NonNull < dyn GcObjPtr > ;
29
28
}
30
29
31
- #[ enum_dispatch( GcObjPtr ) ]
32
- pub ( in crate :: object) enum GcObj {
33
- PyInner ( PyInner < Erased > ) ,
34
- PyObject ( PyObject ) ,
35
- }
36
-
37
- unsafe impl GcTrace for GcObj {
38
- fn trace ( & self , tracer_fn : & mut TracerFn ) {
39
- match self {
40
- GcObj :: PyInner ( v) => v. trace ( tracer_fn) ,
41
- GcObj :: PyObject ( v) => v. trace ( tracer_fn) ,
42
- }
43
- }
44
- }
45
30
/// use `trace()` to call on all owned ObjectRef
46
31
///
47
32
/// # Safety
@@ -67,7 +52,7 @@ pub unsafe trait GcTrace {
67
52
68
53
/// A `TracerFn` is a callback function that is invoked for each `PyGcObjectRef` owned
69
54
/// by an instance of something.
70
- pub type TracerFn < ' a > = dyn FnMut ( & dyn GcObjPtr ) + ' a ;
55
+ pub type TracerFn < ' a > = dyn FnMut ( & PyObject ) + ' a ;
71
56
72
57
unsafe impl GcTrace for PyObjectRef {
73
58
#[ inline]
You can’t perform that action at this time.
0 commit comments