Simplify PyInt.rxor to reuse PyInt.xor

This commit is contained in:
Y. Sapir committed 2019-05-03 01:42:17 +03:00
1 parent 8f3b62ba0e
commit 26306b528f
1 file changed
+1 -5
+1 -5
View File
@@ -296,11 +296,7 @@ impl PyInt {
#[pymethod(name = "__rxor__")]
fn rxor(&self, other: PyObjectRef, vm: &VirtualMachine) -> PyObjectRef {
if objtype::isinstance(&other, &vm.ctx.int_type()) {
vm.ctx.new_int(get_value(&other) ^ (&self.value))
} else {
vm.ctx.not_implemented()
}
self.xor(other, vm)
}
#[pymethod(name = "__or__")]