Merge pull request #2717 from datapythonista/patch-1

Fix module name in getting started
This commit is contained in:
messense 2022-11-01 21:48:57 +08:00 committed by GitHub
commit 9d05a3a96b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,7 +153,7 @@ fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
/// the `lib.name` setting in the `Cargo.toml`, else Python will not be able to
/// import the module.
#[pymodule]
fn string_sum(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
fn pyo3_example(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
Ok(())
}