Skip to content

Commit

Permalink
Fix TOML formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Andrej Orsula <orsula.andrej@gmail.com>
  • Loading branch information
AndrejOrsula committed Mar 8, 2024
1 parent 44b0f4a commit ec35bd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ First, add `pyo3_bindgen` as a **build dependency** to your [`Cargo.toml`](https

```toml
[build-dependencies]
pyo3_bindgen = { version ="0.4" }
pyo3_bindgen = { version = "0.4" }

[dependencies]
pyo3 = { version = "0.20", features = ["auto-initialize"] }
Expand Down Expand Up @@ -140,7 +140,7 @@ As an alternative to build scripts, you can use procedural macros to generate th

```toml
[dependencies]
pyo3_bindgen = { version = "0.4"}
pyo3_bindgen = { version = "0.4" }
```

Subsequently, the `import_python!` macro can be used to generate Rust bindings for the selected Python modules anywhere in your crate. As demonstrated in the example below, Rust bindings are generated for the "math" Python module and can directly be used in the same scope. Similar to the previous approach, the generated bindings must be used within the `pyo3::Python::with_gil` closure to ensure that Python [GIL](https://wiki.python.org/moin/GlobalInterpreterLock) is held.
Expand Down
4 changes: 2 additions & 2 deletions pyo3_bindgen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//!
//! ```toml
//! [build-dependencies]
//! pyo3_bindgen = { version ="0.4" }
//! pyo3_bindgen = { version = "0.4" }
//!
//! [dependencies]
//! pyo3 = { version = "0.20", features = ["auto-initialize"] }
Expand Down Expand Up @@ -66,7 +66,7 @@
//!
//! ```toml
//! [dependencies]
//! pyo3_bindgen = { version = "0.4"}
//! pyo3_bindgen = { version = "0.4" }
//! ```
//!
//! Subsequently, the `import_python!` macro can be used to generate Rust bindings for the selected Python modules anywhere in your crate. As demonstrated in the example below, Rust bindings are generated for the "math" Python module and can directly be used in the same scope. Similar to the previous approach, the generated bindings must be used within the `pyo3::Python::with_gil` closure to ensure that Python [GIL](https://wiki.python.org/moin/GlobalInterpreterLock) is held.
Expand Down

0 comments on commit ec35bd4

Please sign in to comment.