File tree Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -878,13 +878,7 @@ fn run_rustfix(
878
878
stdout : stdout. into ( ) ,
879
879
} ) ?;
880
880
881
- let edition = comments. edition ( revision, & config. comment_defaults ) ?;
882
- let edition = edition
883
- . map ( |mwl| {
884
- let line = mwl. span ( ) . unwrap_or_default ( ) ;
885
- Spanned :: new ( mwl. into_inner ( ) , line)
886
- } )
887
- . into ( ) ;
881
+ let edition = comments. edition ( revision, & config. comment_defaults ) ?. into ( ) ;
888
882
let rustfix_comments = Comments {
889
883
revisions : None ,
890
884
revisioned : std:: iter:: once ( (
Original file line number Diff line number Diff line change @@ -92,15 +92,12 @@ impl Comments {
92
92
& self ,
93
93
revision : & str ,
94
94
default : & Self ,
95
- ) -> Result < Option < MaybeSpanned < String > > , Errored > {
95
+ ) -> Result < Option < Spanned < String > > , Errored > {
96
96
let edition =
97
97
self . find_one_for_revision ( revision, "`edition` annotations" , |r| r. edition . clone ( ) ) ?;
98
98
let default = default
99
99
. find_one_for_revision ( revision, "`edition` annotations" , |r| r. edition . clone ( ) ) ?;
100
- let edition = edition
101
- . into_inner ( )
102
- . or ( default. into_inner ( ) )
103
- . map ( MaybeSpanned :: from) ;
100
+ let edition = edition. into_inner ( ) . or ( default. into_inner ( ) ) ;
104
101
Ok ( edition)
105
102
}
106
103
Original file line number Diff line number Diff line change @@ -23,10 +23,6 @@ impl<T> MaybeSpanned<T> {
23
23
pub fn span ( & self ) -> Option < Span > {
24
24
self . span . clone ( )
25
25
}
26
-
27
- pub fn into_inner ( self ) -> T {
28
- self . data
29
- }
30
26
}
31
27
32
28
impl < T > From < Spanned < T > > for MaybeSpanned < T > {
You can’t perform that action at this time.
0 commit comments