From 58c1832578a103498b0120469b7a5d84833ad1b5 Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Sat, 5 Mar 2022 16:39:51 -0600 Subject: Add an `actix` feature to provide a nicer error message (#57) * Add an `actix` feature to provide a nicer error message for people migrating from <= 0.8 * Fix tests. * Bump version in readme. --- src/actix.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/actix.rs') diff --git a/src/actix.rs b/src/actix.rs index a522a68..a185212 100644 --- a/src/actix.rs +++ b/src/actix.rs @@ -60,7 +60,7 @@ impl ResponseError for QsError { /// /// // Use `QsQuery` extractor for query information. /// // The correct request for this handler would be `/users?id[]=1124&id[]=88"` -/// fn filter_users(info: QsQuery) -> HttpResponse { +/// async fn filter_users(info: QsQuery) -> HttpResponse { /// HttpResponse::Ok().body( /// info.id.iter().map(|i| i.to_string()).collect::>().join(", ") /// ) @@ -164,7 +164,7 @@ where /// } /// /// /// deserialize `Info` from request's querystring -/// fn index(info: QsQuery) -> HttpResponse { +/// async fn index(info: QsQuery) -> HttpResponse { /// HttpResponse::Ok().body( /// format!("Welcome {}!", info.username) /// ) @@ -184,7 +184,6 @@ where /// ); /// } /// ``` - pub struct QsQueryConfig { ehandler: Option ActixError + Send + Sync>>, qs_config: QsConfig, -- cgit v1.2.3