index: Fix some lint issues.

master
Damir Jelić 2020-01-05 12:39:10 +01:00
parent df3d57fd2d
commit 19219316a8
2 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,7 @@ fn value_to_py(py: Python, value: &Value) -> PyResult<PyObject> {
Value::I64(num) => (*num).into_py(py), Value::I64(num) => (*num).into_py(py),
Value::F64(num) => (*num).into_py(py), Value::F64(num) => (*num).into_py(py),
Value::Bytes(b) => b.to_object(py), Value::Bytes(b) => b.to_object(py),
Value::PreTokStr(pretoken) => { Value::PreTokStr(_pretoken) => {
// TODO implement me // TODO implement me
unimplemented!(); unimplemented!();
} }
@ -54,7 +54,7 @@ fn value_to_string(value: &Value) -> String {
Value::Bytes(bytes) => format!("{:?}", bytes), Value::Bytes(bytes) => format!("{:?}", bytes),
Value::Date(d) => format!("{:?}", d), Value::Date(d) => format!("{:?}", d),
Value::Facet(facet) => facet.to_string(), Value::Facet(facet) => facet.to_string(),
Value::PreTokStr(pretok) => { Value::PreTokStr(_pretok) => {
// TODO implement me // TODO implement me
unimplemented!(); unimplemented!();
} }

View File

@ -11,7 +11,7 @@ use crate::searcher::Searcher;
use crate::to_pyerr; use crate::to_pyerr;
use tantivy as tv; use tantivy as tv;
use tantivy::directory::MmapDirectory; use tantivy::directory::MmapDirectory;
use tantivy::schema::{Field, NamedFieldDocument, Term, Value}; use tantivy::schema::{NamedFieldDocument, Term, Value};
const RELOAD_POLICY: &str = "commit"; const RELOAD_POLICY: &str = "commit";
@ -132,7 +132,7 @@ impl IndexWriter {
field_name field_name
))) )))
} }
Value::PreTokStr(pretok) => { Value::PreTokStr(_pretok) => {
return Err(exceptions::ValueError::py_err(format!( return Err(exceptions::ValueError::py_err(format!(
"Field `{}` is pretokenized. This is not authorized for delete.", "Field `{}` is pretokenized. This is not authorized for delete.",
field_name field_name