mirror of https://github.com/rwf2/Rocket.git
Unignore template test. Upstream fix landed.
This commit is contained in:
parent
5abb8d99b4
commit
84abac7f2b
|
@ -133,14 +133,16 @@ impl Template {
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```rust,ignore
|
/// ```rust
|
||||||
/// use std::collections::HashMap;
|
/// use std::collections::HashMap;
|
||||||
/// use rocket_contrib::Template;
|
/// use rocket_contrib::Template;
|
||||||
///
|
///
|
||||||
/// // Create a `context`. Here, just an empty `HashMap`.
|
/// // Create a `context`. Here, just an empty `HashMap`.
|
||||||
/// let mut context = HashMap::new();
|
/// let mut context = HashMap::new();
|
||||||
|
///
|
||||||
|
/// # context.insert("test", "test");
|
||||||
/// let template = Template::render("index", &context);
|
/// let template = Template::render("index", &context);
|
||||||
/// ```
|
/// # assert_eq!(template.to_string(), "");
|
||||||
pub fn render<S, T>(name: S, context: &T) -> Template
|
pub fn render<S, T>(name: S, context: &T) -> Template
|
||||||
where S: AsRef<str>, T: Serialize
|
where S: AsRef<str>, T: Serialize
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue