aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorBlackDex <[email protected]>2021-11-19 17:50:16 +0100
committerDaniel GarcĂ­a <[email protected]>2022-02-27 21:37:23 +0100
commit19b8388950e5f97703ed21c9e4cd47b303e3db81 (patch)
tree78d3a2917ba5f3bcb6e22ed2673b022798977ea4 /src/error.rs
parent87e08b9e50083d5b4aa3219ae5dcb67213427486 (diff)
downloadvaultwarden-19b8388950e5f97703ed21c9e4cd47b303e3db81.tar.gz
vaultwarden-19b8388950e5f97703ed21c9e4cd47b303e3db81.zip
Upd Dockerfiles, crates. Fixed rust 2018 idioms
- Updated crates - Fixed Dockerfiles to build using the rust stable version - Enabled warnings for rust 2018 idioms and fixed them.
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/error.rs b/src/error.rs
index babe82ad..d7d49fca 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -24,7 +24,7 @@ macro_rules! make_error {
}
}
impl std::fmt::Display for Error {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.error {$(
ErrorKind::$name(e) => f.write_str(&$usr_msg_fun(e, &self.message)),
)+}
@@ -93,7 +93,7 @@ make_error! {
}
impl std::fmt::Debug for Error {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self.source() {
Some(e) => write!(f, "{}.\n[CAUSE] {:#?}", self.message, e),
None => match self.error {
@@ -196,7 +196,7 @@ use rocket::request::Request;
use rocket::response::{self, Responder, Response};
impl<'r> Responder<'r, 'static> for Error {
- fn respond_to(self, _: &Request) -> response::Result<'static> {
+ fn respond_to(self, _: &Request<'_>) -> response::Result<'static> {
match self.error {
ErrorKind::Empty(_) => {} // Don't print the error in this situation
ErrorKind::Simple(_) => {} // Don't print the error in this situation