pyo3/tests/test_wrap_pyfunction_deduction.rs

16 lines
278 B
Rust
Raw Normal View History

2021-12-03 00:03:32 +00:00
#![cfg(feature = "macros")]
2021-06-24 14:18:48 +00:00
use pyo3::{prelude::*, types::PyCFunction};
#[pyfunction]
fn f() {}
pub fn add_wrapped(wrapper: &impl Fn(Python) -> PyResult<&PyCFunction>) {
let _ = wrapper;
}
#[test]
fn wrap_pyfunction_deduction() {
add_wrapped(wrap_pyfunction!(f));
}