From ed8675a30cd01edf95a42496f68b079c4c277a9d Mon Sep 17 00:00:00 2001 From: U-Zyn Chua Date: Tue, 5 Nov 2024 14:54:20 +0800 Subject: [PATCH] Snipdoc fix (#958) --- docs-site/content/docs/extras/pluggability.md | 11 ++--------- snipdoc.yml | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/docs-site/content/docs/extras/pluggability.md b/docs-site/content/docs/extras/pluggability.md index 12089c4d4..dc6ffb14d 100644 --- a/docs-site/content/docs/extras/pluggability.md +++ b/docs-site/content/docs/extras/pluggability.md @@ -192,20 +192,13 @@ After you've implemented your own initializer, you should implement the `initial ```rust - async fn initializers(ctx: &AppContext) -> Result>> { - let mut initializers: Vec> = vec![ + async fn initializers(_ctx: &AppContext) -> Result>> { + let initializers: Vec> = vec![ Box::new(initializers::axum_session::AxumSessionInitializer), Box::new(initializers::view_engine::ViewEngineInitializer), Box::new(initializers::hello_view_engine::HelloViewEngineInitializer), - Box::new(loco_extras::initializers::normalize_path::NormalizePathInitializer), ]; - if ctx.environment != Environment::Test { - initializers.push(Box::new( - loco_extras::initializers::prometheus::AxumPrometheusInitializer, - )); - } - Ok(initializers) } ``` diff --git a/snipdoc.yml b/snipdoc.yml index dbe9c2ff1..4e7b62c7d 100644 --- a/snipdoc.yml +++ b/snipdoc.yml @@ -118,7 +118,7 @@ snippets: content: cargo loco scheduler --list path: ./snipdoc.yml scheduler-list-from-file-command: - content: cargo loco scheduler --path config/scheduler.yaml --list + content: cargo loco scheduler --config config/scheduler.yaml --list path: ./snipdoc.yml scheduler-list-from-env-setting-command: content: LOCO_ENV=production cargo loco scheduler --list