Remove SearchErrorKind::Regex as it's never used

This commit is contained in:
RumovZ 2021-05-16 21:07:03 +02:00
parent 4a85ebeda2
commit 9b2cd52b97

View file

@ -34,7 +34,6 @@ pub enum SearchErrorKind {
InvalidPositiveWholeNumber { provided: String, context: String }, InvalidPositiveWholeNumber { provided: String, context: String },
InvalidNegativeWholeNumber { provided: String, context: String }, InvalidNegativeWholeNumber { provided: String, context: String },
InvalidAnswerButton { provided: String, context: String }, InvalidAnswerButton { provided: String, context: String },
Regex(String),
Other(Option<String>), Other(Option<String>),
} }
@ -96,9 +95,6 @@ impl SearchErrorKind {
SearchErrorKind::InvalidPropOperator(ctx) => { SearchErrorKind::InvalidPropOperator(ctx) => {
tr.search_invalid_prop_operator(ctx.as_str()) tr.search_invalid_prop_operator(ctx.as_str())
} }
SearchErrorKind::Regex(text) => {
format!("<pre>`{}`</pre>", text.replace('`', "'")).into()
}
SearchErrorKind::Other(Some(info)) => info.into(), SearchErrorKind::Other(Some(info)) => info.into(),
SearchErrorKind::Other(None) => tr.search_invalid_other(), SearchErrorKind::Other(None) => tr.search_invalid_other(),
SearchErrorKind::InvalidNumber { provided, context } => { SearchErrorKind::InvalidNumber { provided, context } => {