summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Scott <sam@osohq.com>2023-01-07 13:59:50 -0600
committerSam Scott <sam@osohq.com>2023-01-07 13:59:50 -0600
commit951aabb61d3c01e68a81b4ddf2090cfcf945f732 (patch)
tree31ab8b2af7958fb4c9f6608e328892de16b15682 /src
parentfbe9c6bcf2bf19dc46ecf60e255d52f4224359f2 (diff)
Fix axum examples.
Diffstat (limited to 'src')
-rw-r--r--src/axum.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/axum.rs b/src/axum.rs
index 2638b3c..bba133c 100644
--- a/src/axum.rs
+++ b/src/axum.rs
@@ -43,7 +43,7 @@ use axum::{
/// }
///
/// fn main() {
-/// let app = Router::<Body>::new()
+/// let app = Router::<(), Body>::new()
/// .route("/users", get(filter_users));
/// }
pub struct QsQuery<T>(pub T);
@@ -72,6 +72,7 @@ impl<T: std::fmt::Debug> std::fmt::Debug for QsQuery<T> {
impl<T, S> FromRequestParts<S> for QsQuery<T>
where
T: serde::de::DeserializeOwned,
+ S: Send + Sync,
{
type Rejection = QsQueryRejection;
@@ -177,7 +178,7 @@ impl std::error::Error for QsQueryRejection {
/// }
///
/// fn main() {
-/// let app = Router::<Body>::new()
+/// let app = Router::<(), Body>::new()
/// .route("/users", get(filter_users))
/// .layer(Extension(QsQueryConfig::new(5, false)
/// .error_handler(|err| {