mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-07-14 16:25:06 +00:00
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.
This commit is contained in:
parent
87e08b9e50
commit
19b8388950
23 changed files with 84 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue