Skip to content

Commit

Permalink
Extend 'Engines' example to illustrate its proper use.
Browse files Browse the repository at this point in the history
  • Loading branch information
jebrosen committed Nov 16, 2019
1 parent 9c5d091 commit 2244231
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions contrib/lib/src/templates/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ pub(crate) trait Engine: Send + Sync + 'static {
/// # */ unimplemented!();
/// }
///
/// Template::custom(|engines: &mut Engines| {
/// engines.tera.register_filter("my_filter", my_filter);
/// });
/// fn main() {
/// rocket::ignite()
/// // ...
/// .attach(Template::custom(|engines: &mut Engines| {
/// engines.tera.register_filter("my_filter", my_filter);
/// }))
/// // ...
/// # ;
/// }
/// # }
/// ```
///
Expand Down

0 comments on commit 2244231

Please sign in to comment.