From 9fa89e735859d008673663b740c217d0731e71e1 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 7 Jun 2022 22:03:23 -0400 Subject: Move back to stable rust. `maud`, which was the main reason for nightlies, relies on proc macros. Those are stable in the 2021 edition, and maud 0.23+ uses them in a stable-friendly way. --- src/view.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/view.rs') diff --git a/src/view.rs b/src/view.rs index f6413e8..ad26607 100644 --- a/src/view.rs +++ b/src/view.rs @@ -60,7 +60,7 @@ //! links to existing items are not invalidated or changed - the `item` //! parameter to the `/` endpoint is a literal index into this list. -use actix_web::{error, get, post, web, HttpResponse, Responder}; +use actix_web::{error, get, post, web, HttpRequest, HttpResponse, Responder}; use maud::{html, Markup, PreEscaped, DOCTYPE}; use pulldown_cmark::{html, Options, Parser}; use rand::seq::SliceRandom; @@ -98,7 +98,7 @@ trait Urls { fn index_url(&self, query: ItemQuery) -> Result; } -impl Urls for web::HttpRequest { +impl Urls for HttpRequest { fn index_url(&self, query: ItemQuery) -> Result { let mut url = self.url_for("index", iter::empty::<&str>())?; @@ -228,7 +228,7 @@ fn index_view(req: impl Urls, idx: &usize, thing: &Thing) -> MarkupResult { #[get("/")] async fn index( - req: web::HttpRequest, + req: HttpRequest, data: web::Data, query: web::Query, ) -> error::Result { -- cgit v1.2.3