Update dependencies
This commit is contained in:
@ -4,9 +4,8 @@ use duplicate::duplicate;
|
||||
use log::{info, warn};
|
||||
use rocket::http::Status;
|
||||
use rocket::response::{Responder, Response};
|
||||
use rocket::serde::json::{json, Json};
|
||||
use rocket::Request;
|
||||
use rocket_contrib::json;
|
||||
use rocket_contrib::json::Json; // macro
|
||||
|
||||
/// An error message which can be serialized as JSON.
|
||||
///
|
||||
@ -81,7 +80,7 @@ impl From<T> for StatusJson {
|
||||
impl From<Status> for StatusJson {
|
||||
fn from(status: Status) -> StatusJson {
|
||||
StatusJson {
|
||||
description: status.reason.to_string(),
|
||||
description: status.reason().map(|r| r.to_string()).unwrap_or_default(),
|
||||
status,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user