From a9e75e5c1694c9c2121065129e35c449c0fc5c67 Mon Sep 17 00:00:00 2001 From: messense Date: Mon, 17 Jan 2022 09:16:08 +0800 Subject: [PATCH] Update to pyo3 0.15 (#40) --- Cargo.toml | 2 +- build.rs | 2 +- src/document.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d9c3ec3..7f6ae1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ itertools = "0.10.0" futures = "0.3.5" [dependencies.pyo3] -version = "0.14.5" +version = "0.15.1" features = ["extension-module"] [package.metadata.maturin] diff --git a/build.rs b/build.rs index a781ce1..dace4a9 100644 --- a/build.rs +++ b/build.rs @@ -1,3 +1,3 @@ fn main() { - pyo3_build_config::add_extension_module_link_args(); + pyo3_build_config::add_extension_module_link_args(); } diff --git a/src/document.rs b/src/document.rs index df53773..5088f51 100644 --- a/src/document.rs +++ b/src/document.rs @@ -180,9 +180,9 @@ impl Document { if key_value.len() != 2 { continue; } - let key: String = key_value.get_item(0).extract()?; + let key: String = key_value.get_item(0)?.extract()?; let value_list = - extract_value_single_or_list(key_value.get_item(1))?; + extract_value_single_or_list(key_value.get_item(1)?)?; field_values.insert(key, value_list); } } @@ -199,9 +199,9 @@ impl Document { if key_value.len() != 2 { continue; } - let key: String = key_value.get_item(0).extract()?; + let key: String = key_value.get_item(0)?.extract()?; let value_list = - extract_value_single_or_list(key_value.get_item(1))?; + extract_value_single_or_list(key_value.get_item(1)?)?; field_values.insert(key, value_list); } }