Skip to content

Commit

Permalink
Merge branch 'master' into fix-migration-order
Browse files Browse the repository at this point in the history
  • Loading branch information
kaplanelad authored Nov 5, 2024
2 parents 42c322d + d05ebb1 commit 9bda013
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ jobs:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- run: cargo install snipdoc --features exec
- run: snipdoc check
continue-on-error: true
env:
SNIPDOC_SKIP_EXEC_COMMANDS: true
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 9bda013

Please sign in to comment.