Skip to content

Poor formatting of expressions with dots / extra spaces #4543

@chifflier

Description

@chifflier

Hi,

After upgrading rustfmt stable (using rustup), rusftmt add unexpected spaces in expressions containing many dots.
This is a problem in der-parser and oid-registry, since the notation of a OID is a path with digits and dots.
These spaces seem to be added always after the third group (see examples).

Input

let oid = oid!(1.2.840.113549.1.1.5);
let oid2 = oid!(2.5.4.3);

Output

let oid = oid!(1.2.840 .113549 .1 .1 .5);
let oid2 = oid!(2.5.4 .3);

Expected output

let oid = oid!(1.2.840.113549.1.1.5);
let oid2 = oid!(2.5.4.3);

Meta

  • rustfmt version: rustfmt 1.4.24-stable (eb894d5 2020-11-05)
  • From where did you install rustfmt?: rustup

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions