You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the following formatting (from the current nightly build as of 2017-06-17) for a generic Set trait:
impl<T>Set<T>forTwhereT:PartialEq,{defaultfncontains(&self,c:T) -> bool{*self == c
}}
This feels unnecessary to me. When it's this short, and could always fit on a line, there's no reason to wrap:
impl<T>Set<T>forTwhereT:PartialEq,
If we always want to wrap for consistency with longer types, it feels poor to leave the "where" on a line all by itself, the following would look better (and extra generic parameters could still be added underneath and tabbed out to line up with the first one):
impl<T>Set<T>forTwhereT:PartialEq,
The text was updated successfully, but these errors were encountered:
Thanks; it's hard to find any formatting / code things with GitHub's search. If this is intended then there's no issue. For a simple case like this at least it is suprising and "looks like" a bug to me, but of course, maybe it's just me.
You can always write impl<T: PartialEq> Set instead
I assume where exists for a reason and this would not be practical in all cases, however, in this deliberately minimal example you're right, I could.
Consider the following formatting (from the current nightly build as of 2017-06-17) for a generic
Set
trait:This feels unnecessary to me. When it's this short, and could always fit on a line, there's no reason to wrap:
If we always want to wrap for consistency with longer types, it feels poor to leave the "where" on a line all by itself, the following would look better (and extra generic parameters could still be added underneath and tabbed out to line up with the first one):
The text was updated successfully, but these errors were encountered: