From 4b6c3e72ffff99870412cccf44f9c160b7caf31e Mon Sep 17 00:00:00 2001 From: Ryan Russell Date: Sat, 4 Jun 2022 21:38:04 -0500 Subject: [PATCH] Improve Lib Readability Signed-off-by: Ryan Russell --- meilisearch-error/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meilisearch-error/src/lib.rs b/meilisearch-error/src/lib.rs index 6e6273db2..56ac65f9e 100644 --- a/meilisearch-error/src/lib.rs +++ b/meilisearch-error/src/lib.rs @@ -73,12 +73,12 @@ impl aweb::error::ResponseError for ResponseError { pub trait ErrorCode: std::error::Error { fn error_code(&self) -> Code; - /// returns the HTTP status code ascociated with the error + /// returns the HTTP status code associated with the error fn http_status(&self) -> StatusCode { self.error_code().http() } - /// returns the doc url ascociated with the error + /// returns the doc url associated with the error fn error_url(&self) -> String { self.error_code().url() } @@ -173,7 +173,7 @@ pub enum Code { } impl Code { - /// ascociate a `Code` variant to the actual ErrCode + /// associate a `Code` variant to the actual ErrCode fn err_code(&self) -> ErrCode { use Code::*; @@ -286,7 +286,7 @@ impl Code { } } - /// return the HTTP status code ascociated with the `Code` + /// return the HTTP status code associated with the `Code` fn http(&self) -> StatusCode { self.err_code().status_code } @@ -301,7 +301,7 @@ impl Code { self.err_code().error_type.to_string() } - /// return the doc url ascociated with the error + /// return the doc url associated with the error fn url(&self) -> String { format!("https://docs.meilisearch.com/errors#{}", self.name()) }