diff --git a/contrib/src/json/mod.rs b/contrib/src/json/mod.rs index 99a4ace2..52318831 100644 --- a/contrib/src/json/mod.rs +++ b/contrib/src/json/mod.rs @@ -10,7 +10,7 @@ use rocket::response::data; use self::serde::{Serialize, Deserialize}; use self::serde_json::Error as JSONError; -/// The JSON datatype, which implements both `FromRequest` and `Responder`. This +/// The JSON type, which implements both `FromRequest` and `Responder`. This /// type allows you to trivially consume and respond with JSON in your Rocket /// application. /// diff --git a/contrib/src/templates/macros.rs b/contrib/src/templates/macros.rs index 8e438ce5..2527af98 100644 --- a/contrib/src/templates/macros.rs +++ b/contrib/src/templates/macros.rs @@ -1,4 +1,5 @@ -#[macro_export] +/// Returns a hashset with the extensions of all of the enabled template +/// engines from the set of template engined passed in. macro_rules! engine_set { ($($feature:expr => $engine:ident),+,) => ({ use std::collections::HashSet; @@ -18,7 +19,11 @@ macro_rules! engine_set { }); } -#[macro_export] +/// Renders the template named `name` with the given template info `info` and +/// context `ctxt` using one of the templates in the template set passed in. It +/// does this by checking if the template's extension matches the engine's +/// extension, and if so, calls the engine's `render` method. All of this only +/// happens for engine's that have been enabled as features by the user. macro_rules! render_set { ($name:expr, $info:expr, $ctxt:expr, $($feature:expr => $engine:ident),+,) => ({$( #[cfg(feature = $feature)] @@ -36,7 +41,7 @@ macro_rules! render_set { fn $engine(_: &str, _: &TemplateInfo, _: &T) -> Option