diff --git a/vm/src/types/slot.rs b/vm/src/types/slot.rs index dba2194a69..348c9ca337 100644 --- a/vm/src/types/slot.rs +++ b/vm/src/types/slot.rs @@ -992,58 +992,35 @@ pub trait Comparable: PyPayload { vm: &VirtualMachine, ) -> PyResult; + #[inline] #[pymethod(magic)] - fn eq( - zelf: PyRef, - other: PyObjectRef, - vm: &VirtualMachine, - ) -> PyResult { - Self::cmp(&zelf, &other, PyComparisonOp::Eq, vm) + fn eq(zelf: &Py, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { + Self::cmp(zelf, &other, PyComparisonOp::Eq, vm) } #[inline] #[pymethod(magic)] - fn ne( - zelf: PyRef, - other: PyObjectRef, - vm: &VirtualMachine, - ) -> PyResult { - Self::cmp(&zelf, &other, PyComparisonOp::Ne, vm) + fn ne(zelf: &Py, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { + Self::cmp(zelf, &other, PyComparisonOp::Ne, vm) } #[inline] #[pymethod(magic)] - fn lt( - zelf: PyRef, - other: PyObjectRef, - vm: &VirtualMachine, - ) -> PyResult { - Self::cmp(&zelf, &other, PyComparisonOp::Lt, vm) + fn lt(zelf: &Py, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { + Self::cmp(zelf, &other, PyComparisonOp::Lt, vm) } #[inline] #[pymethod(magic)] - fn le( - zelf: PyRef, - other: PyObjectRef, - vm: &VirtualMachine, - ) -> PyResult { - Self::cmp(&zelf, &other, PyComparisonOp::Le, vm) + fn le(zelf: &Py, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { + Self::cmp(zelf, &other, PyComparisonOp::Le, vm) } #[inline] #[pymethod(magic)] - fn ge( - zelf: PyRef, - other: PyObjectRef, - vm: &VirtualMachine, - ) -> PyResult { - Self::cmp(&zelf, &other, PyComparisonOp::Ge, vm) + fn ge(zelf: &Py, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { + Self::cmp(zelf, &other, PyComparisonOp::Ge, vm) } #[inline] #[pymethod(magic)] - fn gt( - zelf: PyRef, - other: PyObjectRef, - vm: &VirtualMachine, - ) -> PyResult { - Self::cmp(&zelf, &other, PyComparisonOp::Gt, vm) + fn gt(zelf: &Py, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { + Self::cmp(zelf, &other, PyComparisonOp::Gt, vm) } }