Skip to content

Consider putting struct enum variants on one line #418

Closed
@nrc

Description

@nrc
-    Switch { adt_def: AdtDef<'tcx> },
+    Switch {
+        adt_def: AdtDef<'tcx>,
+    },

     // test for equality
-    Eq { value: Literal<'tcx>, ty: Ty<'tcx> },
+    Eq {
+        value: Literal<'tcx>,
+        ty: Ty<'tcx>,
+    },

     // test whether the value falls within an inclusive range
-    Range { lo: Literal<'tcx>, hi: Literal<'tcx>, ty: Ty<'tcx> },
+    Range {
+        lo: Literal<'tcx>,
+        hi: Literal<'tcx>,
+        ty: Ty<'tcx>,
+    },

I'm not sure if the original is better or not, tbh, We should have an option for this at the least.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssues up for grabs, also good candidates for new rustfmt contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions