From 148e6cc5bc8b217991742f3d8698f045f3370e86 Mon Sep 17 00:00:00 2001 From: ugaemi Date: Sun, 16 Aug 2020 01:49:01 +0900 Subject: [PATCH] Fix ne for objbyteinner --- vm/src/bytesinner.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/src/bytesinner.rs b/vm/src/bytesinner.rs index b0177ea62..72d260765 100644 --- a/vm/src/bytesinner.rs +++ b/vm/src/bytesinner.rs @@ -275,7 +275,7 @@ impl PyBytesInner { } pub fn ne(&self, other: PyObjectRef, vm: &VirtualMachine) -> PyComparisonValue { - self.cmp(other, |a, b| a != b, vm) + self.eq(other, vm).map(|v| !v) } pub fn ge(&self, other: PyObjectRef, vm: &VirtualMachine) -> PyComparisonValue {