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); } }