What is Nostr?
Chris Gioran /
npub15y4…p6fq
2024-01-15 12:48:52

Chris Gioran on Nostr: #rustlang tip: If you want `cargo fmt` to skip formatting an individual expression ...

#rustlang tip:

If you want `cargo fmt` to skip formatting an individual expression (which it can't), you can instead wrap the expression in a block and apply the rustfmt::skip attribute to that.

This won't work:
```
let mut a;
#[rustfmt::skip]
a = vec![1,
2, 3];

```

but this does:

```
let mut a;
#[rustfmt::skip]
{
a = vec![1,
2, 3];
}
```
Author Public Key
npub15y46zfa47n7t03776fd2syjccjzl0n06r7au86kw9x3hd07xqmeq4wp6fq