@@ -16,47 +16,44 @@ mod _operator {
1616 function:: { ArgBytesLike , FuncArgs , KwArgs , OptionalArg } ,
1717 protocol:: PyIter ,
1818 recursion:: ReprGuard ,
19- types:: {
20- Callable , Constructor ,
21- PyComparisonOp :: { Eq , Ge , Gt , Le , Lt , Ne } ,
22- } ,
19+ types:: { Callable , Constructor , PyComparisonOp } ,
2320 AsObject , Py , PyObjectRef , PyPayload , PyRef , PyResult , VirtualMachine ,
2421 } ;
2522
2623 /// Same as a < b.
2724 #[ pyfunction]
2825 fn lt ( a : PyObjectRef , b : PyObjectRef , vm : & VirtualMachine ) -> PyResult {
29- a. rich_compare ( b, Lt , vm)
26+ a. rich_compare ( b, PyComparisonOp :: Lt , vm)
3027 }
3128
3229 /// Same as a <= b.
3330 #[ pyfunction]
3431 fn le ( a : PyObjectRef , b : PyObjectRef , vm : & VirtualMachine ) -> PyResult {
35- a. rich_compare ( b, Le , vm)
32+ a. rich_compare ( b, PyComparisonOp :: Le , vm)
3633 }
3734
3835 /// Same as a > b.
3936 #[ pyfunction]
4037 fn gt ( a : PyObjectRef , b : PyObjectRef , vm : & VirtualMachine ) -> PyResult {
41- a. rich_compare ( b, Gt , vm)
38+ a. rich_compare ( b, PyComparisonOp :: Gt , vm)
4239 }
4340
4441 /// Same as a >= b.
4542 #[ pyfunction]
4643 fn ge ( a : PyObjectRef , b : PyObjectRef , vm : & VirtualMachine ) -> PyResult {
47- a. rich_compare ( b, Ge , vm)
44+ a. rich_compare ( b, PyComparisonOp :: Ge , vm)
4845 }
4946
5047 /// Same as a == b.
5148 #[ pyfunction]
5249 fn eq ( a : PyObjectRef , b : PyObjectRef , vm : & VirtualMachine ) -> PyResult {
53- a. rich_compare ( b, Eq , vm)
50+ a. rich_compare ( b, PyComparisonOp :: Eq , vm)
5451 }
5552
5653 /// Same as a != b.
5754 #[ pyfunction]
5855 fn ne ( a : PyObjectRef , b : PyObjectRef , vm : & VirtualMachine ) -> PyResult {
59- a. rich_compare ( b, Ne , vm)
56+ a. rich_compare ( b, PyComparisonOp :: Ne , vm)
6057 }
6158
6259 /// Same as not a.
0 commit comments