Skip to content

Commit 048c314

Browse files
committed
Updating pyo3
1 parent 03b32d2 commit 048c314

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "foobar"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]
12-
pyo3 = { version = "0.16.1", features = ["extension-module"] }
12+
pyo3 = { version = "0.23.3", features = ["extension-module"] }
1313

1414
[package.metadata.maturin]
1515
python-source = "python"

python/foobar/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .foobar import pyo3_sum
1+
from ._foobar import pyo3_sum
22

33
def py_sum(a, b):
44
"""Returns the sum of two numbers (Python only)"""

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn pyo3_sum(a: usize, b: usize) -> PyResult<usize> {
1414

1515
/// A Python module implemented in Rust.
1616
#[pymodule]
17-
fn foobar(_py: Python, m: &PyModule) -> PyResult<()> {
17+
fn _foobar(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
1818
m.add_function(wrap_pyfunction!(pyo3_sum, m)?)?;
1919
Ok(())
2020
}

0 commit comments

Comments
 (0)