Open tisonkun opened 3 weeks ago
Check out https://github.com/mitsuhiko/insta/issues/456, both this:
Would be great for inline snapshots to work with
rustfmt
, but don't think there's a way — if the inline snapshot is a normal expression without special syntax (such as@
), it's not possible to discriminate between(name, value)
and(value, snapshot)
...and the broader discussion.
I agree that it would be great to allow rustfmt to work, though lots of other tradeoffs...
Currently,
@r###"..."###
the inline snapshot syntax is invalid duringcargo fmt
analyze and cannot be formatted.Perhaps a different syntax (e.g.
i=r""
) can be used for helping in this case.