Skip to content

Commit

Permalink
Snipdoc fix (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
uzyn authored Nov 5, 2024
1 parent 2d49fd5 commit ed8675a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions docs-site/content/docs/extras/pluggability.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,13 @@ After you've implemented your own initializer, you should implement the `initial

<!-- <snip id="app-initializers" inject_from="code" template="rust"> -->
```rust
async fn initializers(ctx: &AppContext) -> Result<Vec<Box<dyn Initializer>>> {
let mut initializers: Vec<Box<dyn Initializer>> = vec![
async fn initializers(_ctx: &AppContext) -> Result<Vec<Box<dyn Initializer>>> {
let initializers: Vec<Box<dyn Initializer>> = 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)
}
```
Expand Down
2 changes: 1 addition & 1 deletion snipdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed8675a

Please sign in to comment.