Skip to content

Commit d33c501

Browse files
committed
Add test for wrap_pyfunction!() deduction.
1 parent 5289ce0 commit d33c501

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
use pyo3::{prelude::*, types::PyCFunction, wrap_pyfunction};
2+
3+
#[pyfunction]
4+
fn f() {}
5+
6+
pub fn add_wrapped(wrapper: &impl Fn(Python) -> PyResult<&PyCFunction>) {
7+
let _ = wrapper;
8+
}
9+
10+
#[test]
11+
fn wrap_pyfunction_deduction() {
12+
add_wrapped(wrap_pyfunction!(f));
13+
}

0 commit comments

Comments
 (0)