summaryrefslogtreecommitdiff
path: root/src/actix.rs
diff options
context:
space:
mode:
authorSam Scott <sam@osohq.com>2022-03-05 16:39:51 -0600
committerGitHub <noreply@github.com>2022-03-05 17:39:51 -0500
commit58c1832578a103498b0120469b7a5d84833ad1b5 (patch)
tree5af2062e91bc3fd92f93a08b64744a1c60e2ee6f /src/actix.rs
parentd4c2caa53736ada8cd78e256fb95019b79e74bf7 (diff)
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.
Diffstat (limited to 'src/actix.rs')
-rw-r--r--src/actix.rs5
1 files changed, 2 insertions, 3 deletions
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<UsersFilter>) -> HttpResponse {
+/// async fn filter_users(info: QsQuery<UsersFilter>) -> HttpResponse {
/// HttpResponse::Ok().body(
/// info.id.iter().map(|i| i.to_string()).collect::<Vec<String>>().join(", ")
/// )
@@ -164,7 +164,7 @@ where
/// }
///
/// /// deserialize `Info` from request's querystring
-/// fn index(info: QsQuery<Info>) -> HttpResponse {
+/// async fn index(info: QsQuery<Info>) -> HttpResponse {
/// HttpResponse::Ok().body(
/// format!("Welcome {}!", info.username)
/// )
@@ -184,7 +184,6 @@ where
/// );
/// }
/// ```
-
pub struct QsQueryConfig {
ehandler: Option<Arc<dyn Fn(QsError, &HttpRequest) -> ActixError + Send + Sync>>,
qs_config: QsConfig,