diff --git a/README.md b/README.md index 2f2ee71a..f68c887a 100644 --- a/README.md +++ b/README.md @@ -60,14 +60,14 @@ features = ["extension-module"] use pyo3::prelude::*; use pyo3::wrap_pyfunction; -#[pyfunction] /// Formats the sum of two numbers as string. +#[pyfunction] fn sum_as_string(a: usize, b: usize) -> PyResult { Ok((a + b).to_string()) } -#[pymodule] /// A Python module implemented in Rust. +#[pymodule] fn string_sum(py: Python, m: &PyModule) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(sum_as_string))?;