Skip to content

Commit

Permalink
Add test for wrap_pyfunction!() deduction.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed May 6, 2021
1 parent 5289ce0 commit 64e839d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_wrap_pyfunction_deduction.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use pyo3::{types::PyCFunction, prelude::*, wrap_pyfunction};

#[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));
}

0 comments on commit 64e839d

Please sign in to comment.