From 26a0fd1fbee207c96f66775b1728470b4e68019e Mon Sep 17 00:00:00 2001 From: boraarslan Date: Thu, 2 Jun 2022 21:29:28 +0300 Subject: [PATCH] cargo fmt --- src/fastfield/writer.rs | 2 +- src/postings/postings_writer.rs | 6 +++++- src/schema/flags.rs | 9 +++++---- src/schema/value.rs | 3 +-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/fastfield/writer.rs b/src/fastfield/writer.rs index 7a27a2caa..c0e9b6982 100644 --- a/src/fastfield/writer.rs +++ b/src/fastfield/writer.rs @@ -76,7 +76,7 @@ impl FastFieldsWriter { bytes_value_writers.push(fast_field_writer); } } - FieldType::Str(_) | FieldType::JsonObject(_) => {}, + FieldType::Str(_) | FieldType::JsonObject(_) => {} } } FastFieldsWriter { diff --git a/src/postings/postings_writer.rs b/src/postings/postings_writer.rs index 808ca80c4..eec2af263 100644 --- a/src/postings/postings_writer.rs +++ b/src/postings/postings_writer.rs @@ -82,7 +82,11 @@ pub(crate) fn serialize_postings( .collect(); unordered_term_mappings.insert(field, mapping); } - FieldType::U64(_) | FieldType::I64(_) | FieldType::F64(_) | FieldType::Date(_) | FieldType::Bool(_) => {} + FieldType::U64(_) + | FieldType::I64(_) + | FieldType::F64(_) + | FieldType::Date(_) + | FieldType::Bool(_) => {} FieldType::Bytes(_) => {} FieldType::JsonObject(_) => {} } diff --git a/src/schema/flags.rs b/src/schema/flags.rs index 925c021cb..6bb54e3fa 100644 --- a/src/schema/flags.rs +++ b/src/schema/flags.rs @@ -22,9 +22,9 @@ pub const STORED: SchemaFlagList = SchemaFlagList { pub struct IndexedFlag; /// Flag to mark the field as indexed. An indexed field is searchable and has a fieldnorm. /// -/// The `INDEXED` flag can only be used when building `NumericOptions` (`u64`, `i64`, `f64` and `bool` -/// fields) Of course, text fields can also be indexed... But this is expressed by using either the -/// `STRING` (untokenized) or `TEXT` (tokenized with the english tokenizer) flags. +/// The `INDEXED` flag can only be used when building `NumericOptions` (`u64`, `i64`, `f64` and +/// `bool` fields) Of course, text fields can also be indexed... But this is expressed by using +/// either the `STRING` (untokenized) or `TEXT` (tokenized with the english tokenizer) flags. pub const INDEXED: SchemaFlagList = SchemaFlagList { head: IndexedFlag, tail: (), @@ -36,7 +36,8 @@ pub struct FastFlag; /// /// Fast fields can be random-accessed rapidly. Fields useful for scoring, filtering /// or collection should be mark as fast fields. -/// The `FAST` flag can only be used when building `NumericOptions` (`u64`, `i64`, `f64` and `bool` fields) +/// The `FAST` flag can only be used when building `NumericOptions` (`u64`, `i64`, `f64` and `bool` +/// fields) pub const FAST: SchemaFlagList = SchemaFlagList { head: FastFlag, tail: (), diff --git a/src/schema/value.rs b/src/schema/value.rs index 5c3adcdca..5295843d2 100644 --- a/src/schema/value.rs +++ b/src/schema/value.rs @@ -79,8 +79,7 @@ impl<'de> Deserialize<'de> for Value { } fn visit_bool(self, v: bool) -> Result - where - E: serde::de::Error, { + where E: serde::de::Error { Ok(Value::Bool(v)) }