summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2022-07-30 20:25:14 +0200
committerGitHub <noreply@github.com>2022-07-30 13:25:14 -0500
commitadcc16eecff3d629ecdab6bd2ef46b486263ae02 (patch)
tree3a3e610081a5a6c29b1a3b771162eff980336521
parentbe46171d5c796519c70d52aa80db81614dc58da8 (diff)
Fix QsQueryConfig example (#67)
QsQuery's FromRequest implementation expects a plain QsQueryConfig extension, i.e., not an Arc.
-rw-r--r--src/axum.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/axum.rs b/src/axum.rs
index 1605146..90b69b8 100644
--- a/src/axum.rs
+++ b/src/axum.rs
@@ -177,10 +177,10 @@ impl std::error::Error for QsQueryRejection {
/// fn main() {
/// let app = Router::<Body>::new()
/// .route("/users", get(filter_users))
-/// .layer(Extension(Arc::new(QsQueryConfig::new(5, false)
+/// .layer(Extension(QsQueryConfig::new(5, false)
/// .error_handler(|err| {
/// QsQueryRejection::new(err, StatusCode::UNPROCESSABLE_ENTITY)
-/// }))));
+/// })));
/// }
pub struct QsQueryConfig {
max_depth: usize,