Fix clippy warning

This commit is contained in:
Aviv Palivoda
2019-10-17 22:28:11 +03:00
parent a6514ac546
commit 4376993f83

View File

@@ -1134,7 +1134,7 @@ where
fn try_from_object(vm: &VirtualMachine, obj: PyObjectRef) -> PyResult<Self> {
A::try_from_object(vm, obj.clone())
.map(Either::A)
.or(B::try_from_object(vm, obj.clone()).map(Either::B))
.or_else(|_| B::try_from_object(vm, obj.clone()).map(Either::B))
.map_err(|_| vm.new_type_error(format!("unexpected type {}", obj.class())))
}
}