2021-12-03 00:03:32 +00:00
|
|
|
#![cfg(feature = "macros")]
|
|
|
|
|
2021-06-24 14:18:48 +00:00
|
|
|
use pyo3::{prelude::*, types::PyCFunction};
|
2021-05-06 13:58:45 +00:00
|
|
|
|
|
|
|
#[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));
|
|
|
|
}
|