Skip to content

Commit 6bbf0a3

Browse files
committed
Make filters |fmt and |format avail w/ "alloc" w/o "std"
1 parent d5c65ab commit 6bbf0a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rinja_derive/src/generator/expr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ impl<'a> Generator<'a, '_> {
552552
ensure_filter_has_feature_alloc(ctx, name, node)?;
553553
if !args.is_empty() {
554554
if let Expr::StrLit(ref fmt) = *args[0] {
555-
buf.write("rinja::helpers::std::format!(");
555+
buf.write("rinja::helpers::alloc::format!(");
556556
self.visit_str_lit(buf, fmt);
557557
if args.len() > 1 {
558558
buf.write(',');
@@ -576,7 +576,7 @@ impl<'a> Generator<'a, '_> {
576576
ensure_filter_has_feature_alloc(ctx, name, node)?;
577577
if let [_, arg2] = args {
578578
if let Expr::StrLit(ref fmt) = **arg2 {
579-
buf.write("rinja::helpers::std::format!(");
579+
buf.write("rinja::helpers::alloc::format!(");
580580
self.visit_str_lit(buf, fmt);
581581
buf.write(',');
582582
self._visit_args(ctx, buf, &args[..1])?;

0 commit comments

Comments
 (0)