Skip to content

Commit

Permalink
Do not prepend rust macro calls with &
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Sep 18, 2024
1 parent 447729f commit 7d2ca77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rinja_derive/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2732,7 +2732,7 @@ fn is_copyable_within_op(expr: &Expr<'_>, within_op: bool) -> bool {
// The result of a call likely doesn't need to be borrowed,
// as in that case the call is more likely to return a
// reference in the first place then.
Expr::Call(..) | Expr::Path(..) | Expr::Filter(..) => true,
Expr::Call(..) | Expr::Path(..) | Expr::Filter(..) | Expr::RustMacro(..) => true,
// If the `expr` is within a `Unary` or `BinOp` then
// an assumption can be made that the operand is copy.
// If not, then the value is moved and adding `.clone()`
Expand Down

0 comments on commit 7d2ca77

Please sign in to comment.