Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not indent impl generics #3856

Merged
merged 1 commit into from
Oct 11, 2019
Merged

do not indent impl generics #3856

merged 1 commit into from
Oct 11, 2019

Conversation

scampi
Copy link
Contributor

@scampi scampi commented Oct 11, 2019

The fix consists in removing the call to generics_shape_from_config which was indenting generics unnecessarily regardless of the hard_tabs option. The Visual indent style was also adding 2 leading whitespaces which seemed odd; below is a diff of the two formatting versions.

 impl<Target: FromEvent<A> + FromEvent<B>,
-      A: Widget2<Ctx = C>,
-      B: Widget2<Ctx = C>,
-      C: for<'a> CtxFamily<'a>> Widget2 for WidgetEventLifter<Target, A, B>
+     A: Widget2<Ctx = C>,
+     B: Widget2<Ctx = C>,
+     C: for<'a> CtxFamily<'a>> Widget2 for WidgetEventLifter<Target, A, B>
 {
     type Ctx = C;
     type Event = Vec<Target>;
 }

Are the 2 leading whitespaces added on purpose ? Is it OK to remove them ?

Close #3840

Copy link
Contributor

@topecongiro topecongiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the 2 leading whitespaces added on purpose ? Is it OK to remove them ?

This seems a bug to me. Thank you for the fix!

@topecongiro topecongiro added this to the 1.4.10 milestone Oct 11, 2019
@topecongiro topecongiro merged commit a15e97f into master Oct 11, 2019
@topecongiro topecongiro deleted the issue-3840 branch October 11, 2019 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rustfmt formats generic args weirdly with tabs
2 participants