Apply suggestions from code review

Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
Irevoire 2021-09-22 16:59:23 +02:00 committed by Tamo
parent 47ee93b0bd
commit 218f0a6661
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
3 changed files with 10 additions and 10 deletions

View file

@ -210,7 +210,7 @@ impl fmt::Display for UserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Self::AttributeLimitReached => f.write_str("maximum number of attributes reached"),
Self::CriterionError(error) => f.write_str(&error.to_string()),
Self::CriterionError(error) => write!(f, "{}", error),
Self::DocumentLimitReached => f.write_str("maximum number of documents reached"),
Self::InvalidFacetsDistribution { invalid_facets_name } => {
let name_list =