From 941cd965ab84187e659c9629f417725f10ae359b Mon Sep 17 00:00:00 2001 From: Kogia-sima Date: Sun, 26 Jul 2020 00:02:51 +0900 Subject: [PATCH] Do not use render_once_to_string method directly --- sailfish/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sailfish/src/lib.rs b/sailfish/src/lib.rs index 33f40b9..895ded7 100644 --- a/sailfish/src/lib.rs +++ b/sailfish/src/lib.rs @@ -47,6 +47,7 @@ pub trait TemplateOnce: Sized { /// This method never returns `Err`, unless you explicitly return RenderError /// inside templates #[inline] + #[allow(deprecated)] fn render_once(self) -> runtime::RenderResult { let mut buf = String::new(); self.render_once_to_string(&mut buf)?; @@ -57,6 +58,10 @@ pub trait TemplateOnce: Sized { /// /// This method never returns `Err`, unless you explicitly return RenderError /// inside templates + #[deprecated( + since = "0.2.1", + note = "This function may be removed in the future due to performance issue" + )] fn render_once_to_string(self, buf: &mut String) -> Result<(), RenderError>; }