Advertisement · 728 × 90
#
Hashtag
#rustfmt
Advertisement · 728 × 90
A Rust import statement with many imported symbols. There's a // (empty comment) at the beginning that tricks rustfmt into formatting each symbol on a new line.

A Rust import statement with many imported symbols. There's a // (empty comment) at the beginning that tricks rustfmt into formatting each symbol on a new line.

My new favourite Rust hack: you can trick rustfmt into formatting imports with one symbol per line. Found this gem in LKML. It's perfect for large import lists!

#rust #rustfmt #lkml #til

3 0 2 0

I really wish #rustfmt had `remove_newlines = "Never"`, or something.

Add, yes. Remove, no. Bad bot.

1 0 1 0