Update to PyO3 0.8.
parent
75f0670dd6
commit
efbbd24baa
|
@ -15,5 +15,5 @@ tantivy = { git = "https://github.com/tantivy-search/tantivy", branch = "master"
|
||||||
itertools = "0.8"
|
itertools = "0.8"
|
||||||
|
|
||||||
[dependencies.pyo3]
|
[dependencies.pyo3]
|
||||||
version = "0.7.0"
|
version = "0.8"
|
||||||
features = ["extension-module"]
|
features = ["extension-module"]
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2019-05-22
|
nightly-2019-09-24
|
||||||
|
|
|
@ -20,10 +20,10 @@ use tantivy::schema::Value;
|
||||||
|
|
||||||
fn value_to_py(py: Python, value: &Value) -> PyResult<PyObject> {
|
fn value_to_py(py: Python, value: &Value) -> PyResult<PyObject> {
|
||||||
Ok(match value {
|
Ok(match value {
|
||||||
Value::Str(text) => text.into_object(py),
|
Value::Str(text) => text.into_py(py),
|
||||||
Value::U64(num) => num.into_object(py),
|
Value::U64(num) => (*num).into_py(py),
|
||||||
Value::I64(num) => num.into_object(py),
|
Value::I64(num) => (*num).into_py(py),
|
||||||
Value::F64(num) => num.into_object(py),
|
Value::F64(num) => (*num).into_py(py),
|
||||||
Value::Bytes(b) => b.to_object(py),
|
Value::Bytes(b) => b.to_object(py),
|
||||||
Value::Date(d) => PyDateTime::new(
|
Value::Date(d) => PyDateTime::new(
|
||||||
py,
|
py,
|
||||||
|
@ -36,8 +36,8 @@ fn value_to_py(py: Python, value: &Value) -> PyResult<PyObject> {
|
||||||
d.timestamp_subsec_micros(),
|
d.timestamp_subsec_micros(),
|
||||||
None,
|
None,
|
||||||
)?
|
)?
|
||||||
.into_object(py),
|
.into_py(py),
|
||||||
Value::Facet(f) => Facet { inner: f.clone() }.into_object(py),
|
Value::Facet(f) => Facet { inner: f.clone() }.into_py(py),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue