parent
054453be88
commit
d6677b3319
2 changed files with 4 additions and 4 deletions
|
@ -85,8 +85,8 @@ pub mod rt {
|
|||
///
|
||||
/// See <https://github.com/rust-lang/rust/issues/16617>
|
||||
#[inline]
|
||||
pub fn write_fmt<T: fmt::Display>(w: &mut fmt::Write, value: T) -> fmt::Result {
|
||||
write!(w, "{}", value)
|
||||
pub fn write_fmt<T: fmt::Display>(w: &mut fmt::Write, value: &T) -> fmt::Result {
|
||||
write!(w, "{}", *value)
|
||||
}
|
||||
|
||||
pub struct Escaper<'a, 'b: 'a> {
|
||||
|
|
|
@ -96,12 +96,12 @@ impl<'cx> Renderer<'cx> {
|
|||
let w = self.w;
|
||||
let expr = match escape {
|
||||
Escape::PassThru =>
|
||||
quote_expr!(self.cx, ::maud::rt::write_fmt($w, $expr)),
|
||||
quote_expr!(self.cx, ::maud::rt::write_fmt($w, &$expr)),
|
||||
Escape::Escape =>
|
||||
quote_expr!(self.cx,
|
||||
::maud::rt::write_fmt(
|
||||
&mut ::maud::rt::Escaper { inner: $w },
|
||||
$expr)),
|
||||
&$expr)),
|
||||
};
|
||||
let stmt = self.cx.stmt_expr(self.cx.expr_try(expr.span, expr));
|
||||
self.push(stmt);
|
||||
|
|
Loading…
Add table
Reference in a new issue