diff options
author | Trinity Pointard <trinity.pointard@gmail.com> | 2021-04-06 05:25:28 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-04-27 16:47:08 +0200 |
commit | 74373aebcfdfcf5c03e4fb6510d8dd664a0b9b88 (patch) | |
tree | d33d89915de29eb69e1b527c686f26358fcd2b45 /src/api | |
parent | 16300bbd89235dfb5852413cd451535559664594 (diff) | |
download | garage-74373aebcfdfcf5c03e4fb6510d8dd664a0b9b88.tar.gz garage-74373aebcfdfcf5c03e4fb6510d8dd664a0b9b88.zip |
make most requested changes
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/error.rs | 4 | ||||
-rw-r--r-- | src/api/lib.rs | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/api/error.rs b/src/api/error.rs index acd8ebf7..ad0174ad 100644 --- a/src/api/error.rs +++ b/src/api/error.rs @@ -29,7 +29,7 @@ pub enum Error { NotFound, // Category: bad request - /// The request used an invalid path + /// The request contained an invalid UTF-8 sequence in its path or in other parameters #[error(display = "Invalid UTF-8: {}", _0)] InvalidUTF8Str(#[error(source)] std::str::Utf8Error), @@ -65,7 +65,7 @@ impl From<roxmltree::Error> for Error { } impl Error { - /// Convert an error into an Http status code + /// Get the HTTP status code that best represents the meaning of the error for the client pub fn http_status_code(&self) -> StatusCode { match self { Error::NotFound => StatusCode::NOT_FOUND, diff --git a/src/api/lib.rs b/src/api/lib.rs index d036cdd6..be7e37c8 100644 --- a/src/api/lib.rs +++ b/src/api/lib.rs @@ -1,4 +1,3 @@ -#![deny(missing_crate_level_docs, missing_docs)] //! Crate for serving a S3 compatible API #[macro_use] extern crate log; |