File tree 2 files changed +10
-11
lines changed
rustfmt-core/rustfmt-lib/src
2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -42,17 +42,6 @@ impl Rewrite for ast::Expr {
42
42
}
43
43
}
44
44
45
- impl Rewrite for Option < ptr:: P < ast:: Expr > > {
46
- fn rewrite ( & self , context : & RewriteContext < ' _ > , shape : Shape ) -> Option < String > {
47
- match & self {
48
- None => Some ( "" . to_owned ( ) ) ,
49
- Some ( ref exp) => {
50
- exp. rewrite ( context, shape)
51
- }
52
- }
53
- }
54
- }
55
-
56
45
#[ derive( Copy , Clone , PartialEq ) ]
57
46
pub ( crate ) enum ExprType {
58
47
Statement ,
Original file line number Diff line number Diff line change @@ -180,6 +180,16 @@ impl Rewrite for Pat {
180
180
}
181
181
}
182
182
PatKind :: Range ( ref lhs, ref rhs, ref end_kind) => {
183
+ impl Rewrite for Option < ptr:: P < ast:: Expr > > {
184
+ fn rewrite ( & self , context : & RewriteContext < ' _ > , shape : Shape ) -> Option < String > {
185
+ match & self {
186
+ None => Some ( "" . to_owned ( ) ) ,
187
+ Some ( ref exp) => {
188
+ exp. rewrite ( context, shape)
189
+ }
190
+ }
191
+ }
192
+ }
183
193
let infix = match end_kind. node {
184
194
RangeEnd :: Included ( RangeSyntax :: DotDotDot ) => "..." ,
185
195
RangeEnd :: Included ( RangeSyntax :: DotDotEq ) => "..=" ,
You can’t perform that action at this time.
0 commit comments