From c7b489f8cb397140f77571293f6e9faeef2f6319 Mon Sep 17 00:00:00 2001 From: Liu Hancheng Date: Fri, 25 Mar 2022 21:36:11 +0800 Subject: [PATCH] tidy --- meilisearch-lib/src/document_formats.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/meilisearch-lib/src/document_formats.rs b/meilisearch-lib/src/document_formats.rs index c116039ff..bddb16680 100644 --- a/meilisearch-lib/src/document_formats.rs +++ b/meilisearch-lib/src/document_formats.rs @@ -35,13 +35,10 @@ impl Display for DocumentFormatError { Self::Internal(e) => write!(f, "An internal error has occurred: `{}`.", e), Self::MalformedPayload(me, b) => match me.borrow() { milli::documents::Error::JsonError(se) => { - // "invalid type: {}, expected {}" - let mut serde_msg = se.to_string(); - // https://github.com/meilisearch/meilisearch/issues/2107 // The user input maybe insanely long. We need to truncate it. + let mut serde_msg = se.to_string(); let prefix = r#"invalid type: string ""#; - if serde_msg.starts_with(prefix) { let start_idx = prefix.len(); if let Some(end_idx) = serde_msg.rfind("\"") {