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>
|
/// See <https://github.com/rust-lang/rust/issues/16617>
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn write_fmt<T: fmt::Display>(w: &mut fmt::Write, value: T) -> fmt::Result {
|
pub fn write_fmt<T: fmt::Display>(w: &mut fmt::Write, value: &T) -> fmt::Result {
|
||||||
write!(w, "{}", value)
|
write!(w, "{}", *value)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Escaper<'a, 'b: 'a> {
|
pub struct Escaper<'a, 'b: 'a> {
|
||||||
|
|
|
@ -96,12 +96,12 @@ impl<'cx> Renderer<'cx> {
|
||||||
let w = self.w;
|
let w = self.w;
|
||||||
let expr = match escape {
|
let expr = match escape {
|
||||||
Escape::PassThru =>
|
Escape::PassThru =>
|
||||||
quote_expr!(self.cx, ::maud::rt::write_fmt($w, $expr)),
|
quote_expr!(self.cx, ::maud::rt::write_fmt($w, &$expr)),
|
||||||
Escape::Escape =>
|
Escape::Escape =>
|
||||||
quote_expr!(self.cx,
|
quote_expr!(self.cx,
|
||||||
::maud::rt::write_fmt(
|
::maud::rt::write_fmt(
|
||||||
&mut ::maud::rt::Escaper { inner: $w },
|
&mut ::maud::rt::Escaper { inner: $w },
|
||||||
$expr)),
|
&$expr)),
|
||||||
};
|
};
|
||||||
let stmt = self.cx.stmt_expr(self.cx.expr_try(expr.span, expr));
|
let stmt = self.cx.stmt_expr(self.cx.expr_try(expr.span, expr));
|
||||||
self.push(stmt);
|
self.push(stmt);
|
||||||
|
|
Loading…
Add table
Reference in a new issue