From 2ea2f7570c440022398a07b846945f591ed67401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=80=9A=E9=AA=8B?= Date: Thu, 14 Oct 2021 16:46:13 +0800 Subject: [PATCH] use nightly cargo to format the code --- milli/src/search/facet/filter_condition.rs | 1 - milli/src/search/facet/filter_parser.rs | 28 ++++++++++------------ 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/milli/src/search/facet/filter_condition.rs b/milli/src/search/facet/filter_condition.rs index 0e98edd2c..c76bb9388 100644 --- a/milli/src/search/facet/filter_condition.rs +++ b/milli/src/search/facet/filter_condition.rs @@ -8,7 +8,6 @@ use nom::error::{convert_error, VerboseError}; use roaring::RoaringBitmap; use self::FilterCondition::*; - use super::filter_parser::{Operator, ParseContext}; use super::FacetNumberRange; use crate::error::{Error, UserError}; diff --git a/milli/src/search/facet/filter_parser.rs b/milli/src/search/facet/filter_parser.rs index 123a80c35..ee8249069 100644 --- a/milli/src/search/facet/filter_parser.rs +++ b/milli/src/search/facet/filter_parser.rs @@ -2,22 +2,18 @@ use std::collections::HashSet; use std::fmt::Debug; use std::result::Result as StdResult; -use super::FilterCondition; -use crate::{FieldId, FieldsIdsMap}; -use nom::{ - branch::alt, - bytes::complete::{tag, take_while1}, - character::complete::{char, multispace0}, - combinator::map, - error::VerboseError, - error::{ContextError, ErrorKind}, - multi::many0, - multi::separated_list1, - sequence::{delimited, preceded, tuple}, - IResult, -}; +use nom::branch::alt; +use nom::bytes::complete::{tag, take_while1}; +use nom::character::complete::{char, multispace0}; +use nom::combinator::map; +use nom::error::{ContextError, ErrorKind, VerboseError}; +use nom::multi::{many0, separated_list1}; +use nom::sequence::{delimited, preceded, tuple}; +use nom::IResult; use self::Operator::*; +use super::FilterCondition; +use crate::{FieldId, FieldsIdsMap}; #[derive(Debug, Clone, PartialEq)] pub enum Operator { GreaterThan(f64), @@ -330,7 +326,8 @@ mod tests { use maplit::hashset; use super::*; - use crate::{update::Settings, Index}; + use crate::update::Settings; + use crate::Index; #[test] fn string() { @@ -623,6 +620,5 @@ mod tests { assert!(error .to_string() .contains("Longitude must be contained between -180 and 180 degrees.")); - } }