From ec35bd4422201c47799176973c759b09d3114d53 Mon Sep 17 00:00:00 2001 From: Andrej Orsula Date: Sat, 9 Mar 2024 00:14:37 +0100 Subject: [PATCH] Fix TOML formatting Signed-off-by: Andrej Orsula --- README.md | 4 ++-- pyo3_bindgen/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9afdfea..1326929 100644 --- a/README.md +++ b/README.md @@ -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"] } @@ -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. diff --git a/pyo3_bindgen/src/lib.rs b/pyo3_bindgen/src/lib.rs index 45a8759..973d693 100644 --- a/pyo3_bindgen/src/lib.rs +++ b/pyo3_bindgen/src/lib.rs @@ -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"] } @@ -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.