Skip to content

Commit

Permalink
⬆️ deps: bump pyo3 to 0.21.0-beta.0 and use new bound API
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Mar 11, 2024
1 parent cea18be commit cf3ba4b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
28 changes: 18 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ crate-type = ["cdylib"]

[dependencies]
indoc = "2.0.4"
pyo3 = "0.20.2"
pyo3 = "0.21.0-beta.0"
textwrap = "0.16.1"
3 changes: 1 addition & 2 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use crate::parser::docstring::parse_docstring;
use crate::schema::{Argument, Docstring, DocstringParagraph};
use pyo3::exceptions::PyValueError;
use pyo3::prelude::*;
use pyo3::types::PyList;

#[pyclass]
struct PyArgument {
Expand Down Expand Up @@ -131,7 +130,7 @@ fn parse(input: &str) -> PyResult<PyDocstring> {
/// A Python module implemented in Rust.
#[pymodule]
#[pyo3(name = "_core")]
fn docstring_parser(_py: Python, m: &PyModule) -> PyResult<()> {
fn docstring_parser(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(parse, m)?)?;
Ok(())
}

0 comments on commit cf3ba4b

Please sign in to comment.