Skip to content

Commit c69ff17

Browse files
committed
Replace PyInquiryFunc to PyUnaryFunc<bool>
Signed-off-by: snowapril <sinjihng@gmail.com>
1 parent 9c38e90 commit c69ff17

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

vm/src/protocol/number.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use crate::{
1111
VirtualMachine,
1212
};
1313

14-
pub type PyNumberInquiryFunc = fn(PyNumber, &VirtualMachine) -> PyResult<bool>;
1514
pub type PyNumberUnaryFunc<R = PyObjectRef> = fn(PyNumber, &VirtualMachine) -> PyResult<R>;
1615
pub type PyNumberBinaryFunc = fn(&PyObject, &PyObject, &VirtualMachine) -> PyResult;
1716
pub type PyNumberTernaryFunc = fn(&PyObject, &PyObject, &PyObject, &VirtualMachine) -> PyResult;
@@ -127,7 +126,7 @@ pub struct PyNumberMethods {
127126
pub negative: Option<PyNumberUnaryFunc>,
128127
pub positive: Option<PyNumberUnaryFunc>,
129128
pub absolute: Option<PyNumberUnaryFunc>,
130-
pub boolean: Option<PyNumberInquiryFunc>,
129+
pub boolean: Option<PyNumberUnaryFunc<bool>>,
131130
pub invert: Option<PyNumberUnaryFunc>,
132131
pub lshift: Option<PyNumberBinaryFunc>,
133132
pub rshift: Option<PyNumberBinaryFunc>,
@@ -251,7 +250,7 @@ pub struct PyNumberSlots {
251250
pub negative: AtomicCell<Option<PyNumberUnaryFunc>>,
252251
pub positive: AtomicCell<Option<PyNumberUnaryFunc>>,
253252
pub absolute: AtomicCell<Option<PyNumberUnaryFunc>>,
254-
pub boolean: AtomicCell<Option<PyNumberInquiryFunc>>,
253+
pub boolean: AtomicCell<Option<PyNumberUnaryFunc<bool>>>,
255254
pub invert: AtomicCell<Option<PyNumberUnaryFunc>>,
256255
pub lshift: AtomicCell<Option<PyNumberBinaryFunc>>,
257256
pub rshift: AtomicCell<Option<PyNumberBinaryFunc>>,

0 commit comments

Comments
 (0)