Skip to content

x fmt should only format modified files by default #105688

Closed
@jyn514

Description

@jyn514

Since rustfmt is deterministic and idempotent, running it twice on the same file should always have the same output (if it's not both of those things, it's a bug). So we can avoid running it unless the file has changed, which should make x fmt without arguments much faster.

Originally posted by @chenyukang in #105648 (comment)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions