Skip to content

Update Config to have a single field alignment option #2114

@eureka-cpu

Description

@eureka-cpu

This could look like:

pub struct Structures {
    /// Align fields of user defined structures to a threshold.
    pub field_alignment: FieldAlignment,
    /// Put small struct literals on a single line.
    pub struct_lit_single_line: bool,
}

pub enum FieldAlignment {
    AlignFields(usize),
    Off,
}

This would reduce the clutter in Config, remove the need for extra constants and take away the need for the user to input the same number for each type of alignment.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions