@@ -84,7 +84,7 @@ impl Whitespace {
84
84
}
85
85
86
86
pub struct QuoteOffsets {
87
- pub quotes : [ TextRange ; 2 ] ,
87
+ pub quotes : ( TextRange , TextRange ) ,
88
88
pub contents : TextRange ,
89
89
}
90
90
@@ -103,7 +103,7 @@ impl QuoteOffsets {
103
103
let end = TextSize :: of ( literal) ;
104
104
105
105
let res = QuoteOffsets {
106
- quotes : [ TextRange :: new ( start, left_quote) , TextRange :: new ( right_quote, end) ] ,
106
+ quotes : ( TextRange :: new ( start, left_quote) , TextRange :: new ( right_quote, end) ) ,
107
107
contents : TextRange :: new ( left_quote, right_quote) ,
108
108
} ;
109
109
Some ( res)
@@ -116,17 +116,17 @@ pub trait HasQuotes: AstToken {
116
116
let offsets = QuoteOffsets :: new ( text) ?;
117
117
let o = self . syntax ( ) . text_range ( ) . start ( ) ;
118
118
let offsets = QuoteOffsets {
119
- quotes : [ offsets. quotes [ 0 ] + o, offsets. quotes [ 1 ] + o] ,
119
+ quotes : ( offsets. quotes . 0 + o, offsets. quotes . 1 + o) ,
120
120
contents : offsets. contents + o,
121
121
} ;
122
122
Some ( offsets)
123
123
}
124
124
fn open_quote_text_range ( & self ) -> Option < TextRange > {
125
- self . quote_offsets ( ) . map ( |it| it. quotes [ 0 ] )
125
+ self . quote_offsets ( ) . map ( |it| it. quotes . 0 )
126
126
}
127
127
128
128
fn close_quote_text_range ( & self ) -> Option < TextRange > {
129
- self . quote_offsets ( ) . map ( |it| it. quotes [ 1 ] )
129
+ self . quote_offsets ( ) . map ( |it| it. quotes . 1 )
130
130
}
131
131
132
132
fn text_range_between_quotes ( & self ) -> Option < TextRange > {
0 commit comments