From 991c8426c2706d1f940694c128126e881b4e0b8c Mon Sep 17 00:00:00 2001 From: messense Date: Thu, 31 Mar 2022 21:50:28 +0800 Subject: [PATCH] Use `compare` instead of `lt` --- src/callback.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/callback.rs b/src/callback.rs index a9dc1429db8..77928406313 100644 --- a/src/callback.rs +++ b/src/callback.rs @@ -251,7 +251,9 @@ where .import("sys")? .getattr("implementation")? .getattr("version")?; - if version.lt(crate::types::PyTuple::new(py, &PYPY_GOOD_VERSION))? { + if version.compare(crate::types::PyTuple::new(py, &PYPY_GOOD_VERSION))? + == std::cmp::Ordering::Less + { let warn = py.import("warnings")?.getattr("warn")?; warn.call1(( "PyPy 3.7 versions older than 7.3.8 are known to have binary \