rustfmt
rustfmt copied to clipboard
reuse `rewrite_static` when formatting foreign static items
fixes #6267
The ForeignItemKind::Static(_) match arm in the ast::ForeignItem Rewrite impl duplicated some of the logic already implemented in rewrite_static, so reusing it helps centralize the logic.
The other benefit to using rewrite_static is that it already supports rewriting the rhs of a static assignment.