lohr: upgrade to Rocket v0.5.0-rc.1

This commit is contained in:
Antoine Martin 2021-06-10 05:36:39 +02:00
parent 7fad5a6a87
commit b78c486a0e
3 changed files with 44 additions and 66 deletions

View file

@ -72,7 +72,7 @@ where
{
type Error = anyhow::Error;
async fn from_data(request: &'r Request<'_>, data: Data) -> Outcome<Self, Self::Error> {
async fn from_data(request: &'r Request<'_>, data: Data<'r>) -> Outcome<'r, Self> {
let json_ct = ContentType::new("application", "json");
if request.content_type() != Some(&json_ct) {
return Outcome::Failure((Status::BadRequest, anyhow!("wrong content type")));