aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-07-22 15:01:21 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-07-22 15:01:21 +0100
commit879832099565fa051c3877558f85a8e194dc0ce6 (patch)
treecb2bdb797f05193fe731a6d9fa2e6d500c513e4a
parent8a25a1ee65031a687ad7d208eaa2843aed6c9752 (diff)
downloadaskama-879832099565fa051c3877558f85a8e194dc0ce6.tar.gz
askama-879832099565fa051c3877558f85a8e194dc0ce6.tar.bz2
askama-879832099565fa051c3877558f85a8e194dc0ce6.zip
Change order for Template trait methods
Diffstat (limited to '')
-rw-r--r--askama/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/askama/src/lib.rs b/askama/src/lib.rs
index c7cd182..7f14b3d 100644
--- a/askama/src/lib.rs
+++ b/askama/src/lib.rs
@@ -329,14 +329,14 @@ use std::path::Path;
/// Main `Template` trait; implementations are generally derived
pub trait Template {
- /// Renders the template to the given `writer` buffer
- fn render_into(&self, writer: &mut std::fmt::Write) -> Result<()>;
/// Helper method which allocates a new `String` and renders into it
fn render(&self) -> Result<String> {
let mut buf = String::new();
self.render_into(&mut buf)?;
Ok(buf)
}
+ /// Renders the template to the given `writer` buffer
+ fn render_into(&self, writer: &mut std::fmt::Write) -> Result<()>;
/// Helper method to inspect the template's extension
fn extension(&self) -> Option<&str>;
}