mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 05:14:27 +01:00
Merge #2459
2459: Fix typo in codebase comments r=Kerollmops a=ryanrussell # Pull Request ## PR checklist - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Co-authored-by: Ryan Russell <git@ryanrussell.org>
This commit is contained in:
commit
c6ce3452cf
@ -205,7 +205,7 @@ impl HeedAuthStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Codec allowing to retrieve the expiration date of an action,
|
/// Codec allowing to retrieve the expiration date of an action,
|
||||||
/// optionnally on a spcific index, for a given key.
|
/// optionally on a specific index, for a given key.
|
||||||
pub struct KeyIdActionCodec;
|
pub struct KeyIdActionCodec;
|
||||||
|
|
||||||
impl<'a> milli::heed::BytesDecode<'a> for KeyIdActionCodec {
|
impl<'a> milli::heed::BytesDecode<'a> for KeyIdActionCodec {
|
||||||
|
@ -73,12 +73,12 @@ impl aweb::error::ResponseError for ResponseError {
|
|||||||
pub trait ErrorCode: std::error::Error {
|
pub trait ErrorCode: std::error::Error {
|
||||||
fn error_code(&self) -> Code;
|
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 {
|
fn http_status(&self) -> StatusCode {
|
||||||
self.error_code().http()
|
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 {
|
fn error_url(&self) -> String {
|
||||||
self.error_code().url()
|
self.error_code().url()
|
||||||
}
|
}
|
||||||
@ -173,7 +173,7 @@ pub enum Code {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Code {
|
impl Code {
|
||||||
/// ascociate a `Code` variant to the actual ErrCode
|
/// associate a `Code` variant to the actual ErrCode
|
||||||
fn err_code(&self) -> ErrCode {
|
fn err_code(&self) -> ErrCode {
|
||||||
use Code::*;
|
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 {
|
fn http(&self) -> StatusCode {
|
||||||
self.err_code().status_code
|
self.err_code().status_code
|
||||||
}
|
}
|
||||||
@ -301,7 +301,7 @@ impl Code {
|
|||||||
self.err_code().error_type.to_string()
|
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 {
|
fn url(&self) -> String {
|
||||||
format!("https://docs.meilisearch.com/errors#{}", self.name())
|
format!("https://docs.meilisearch.com/errors#{}", self.name())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user