Commit 72e6ffc 1 parent 86c9fa4 commit 72e6ffc Copy full SHA for 72e6ffc
File tree 2 files changed +13
-8
lines changed
2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -3346,14 +3346,22 @@ pub(crate) mod printing {
3346
3346
3347
3347
#[ cfg( feature = "full" ) ]
3348
3348
#[ cfg_attr( doc_cfg, doc( cfg( feature = "printing" ) ) ) ]
3349
- impl ToTokens for ExprRange {
3349
+ impl ToTokens for RangeLimits {
3350
3350
fn to_tokens ( & self , tokens : & mut TokenStream ) {
3351
- outer_attrs_to_tokens ( & self . attrs , tokens) ;
3352
- self . from . to_tokens ( tokens) ;
3353
- match & self . limits {
3351
+ match self {
3354
3352
RangeLimits :: HalfOpen ( t) => t. to_tokens ( tokens) ,
3355
3353
RangeLimits :: Closed ( t) => t. to_tokens ( tokens) ,
3356
3354
}
3355
+ }
3356
+ }
3357
+
3358
+ #[ cfg( feature = "full" ) ]
3359
+ #[ cfg_attr( doc_cfg, doc( cfg( feature = "printing" ) ) ) ]
3360
+ impl ToTokens for ExprRange {
3361
+ fn to_tokens ( & self , tokens : & mut TokenStream ) {
3362
+ outer_attrs_to_tokens ( & self . attrs , tokens) ;
3363
+ self . from . to_tokens ( tokens) ;
3364
+ self . limits . to_tokens ( tokens) ;
3357
3365
self . to . to_tokens ( tokens) ;
3358
3366
}
3359
3367
}
Original file line number Diff line number Diff line change @@ -878,10 +878,7 @@ mod printing {
878
878
fn to_tokens ( & self , tokens : & mut TokenStream ) {
879
879
tokens. append_all ( self . attrs . outer ( ) ) ;
880
880
self . lo . to_tokens ( tokens) ;
881
- match & self . limits {
882
- RangeLimits :: HalfOpen ( t) => t. to_tokens ( tokens) ,
883
- RangeLimits :: Closed ( t) => t. to_tokens ( tokens) ,
884
- }
881
+ self . limits . to_tokens ( tokens) ;
885
882
self . hi . to_tokens ( tokens) ;
886
883
}
887
884
}
You can’t perform that action at this time.
0 commit comments