@@ -103,7 +103,7 @@ pub enum RenderedLineKind {
103
103
Annotations ,
104
104
Elision ,
105
105
}
106
- use self :: RenderedLineKind :: * ;
106
+ use self :: RenderedLineKind as RLK ;
107
107
108
108
impl SnippetData {
109
109
pub fn new ( codemap : Rc < CodeMap > ,
@@ -244,19 +244,19 @@ impl RenderedLine {
244
244
impl RenderedLineKind {
245
245
fn prefix ( & self ) -> StyledString {
246
246
match * self {
247
- SourceText { file : _, line_index } =>
247
+ RLK :: SourceText { file : _, line_index } =>
248
248
StyledString {
249
249
text : format ! ( "{}" , line_index + 1 ) ,
250
250
style : LineNumber ,
251
251
} ,
252
- Elision =>
252
+ RLK :: Elision =>
253
253
StyledString {
254
254
text : String :: from ( "..." ) ,
255
255
style : LineNumber ,
256
256
} ,
257
- PrimaryFileName |
258
- OtherFileName |
259
- Annotations =>
257
+ RLK :: PrimaryFileName |
258
+ RLK :: OtherFileName |
259
+ RLK :: Annotations =>
260
260
StyledString {
261
261
text : String :: from ( "" ) ,
262
262
style : LineNumber ,
@@ -296,7 +296,7 @@ impl StyledBuffer {
296
296
//We know our first output line is source and the rest are highlights and labels
297
297
output. push ( RenderedLine { text : styled_vec, kind : source_kind. clone ( ) } ) ;
298
298
} else {
299
- output. push ( RenderedLine { text : styled_vec, kind : Annotations } ) ;
299
+ output. push ( RenderedLine { text : styled_vec, kind : RLK :: Annotations } ) ;
300
300
}
301
301
styled_vec = vec ! [ ] ;
302
302
}
@@ -484,7 +484,7 @@ impl FileInfo {
484
484
text: format!( ":{}:{}" , lo. line, lo. col. 0 + 1 ) ,
485
485
style: LineAndColumn ,
486
486
} ] ,
487
- kind : PrimaryFileName ,
487
+ kind : RLK :: PrimaryFileName ,
488
488
} ) ;
489
489
}
490
490
None => {
@@ -493,7 +493,7 @@ impl FileInfo {
493
493
text: self . file. name. clone( ) ,
494
494
style: FileNameStyle ,
495
495
} ] ,
496
- kind : OtherFileName ,
496
+ kind : RLK :: OtherFileName ,
497
497
} ) ;
498
498
}
499
499
}
@@ -534,7 +534,7 @@ impl FileInfo {
534
534
if prev_ends_at_eol && is_single_unlabeled_annotated_line {
535
535
if !elide_unlabeled_region {
536
536
output. push ( RenderedLine :: from ( ( String :: new ( ) ,
537
- NoStyle , Elision ) ) ) ;
537
+ NoStyle , RLK :: Elision ) ) ) ;
538
538
elide_unlabeled_region = true ;
539
539
prev_ends_at_eol = true ;
540
540
}
@@ -548,7 +548,7 @@ impl FileInfo {
548
548
}
549
549
} else {
550
550
if group. len ( ) > 1 {
551
- output. push ( RenderedLine :: from ( ( String :: new ( ) , NoStyle , Elision ) ) ) ;
551
+ output. push ( RenderedLine :: from ( ( String :: new ( ) , NoStyle , RLK :: Elision ) ) ) ;
552
552
} else {
553
553
let mut v: Vec < RenderedLine > =
554
554
group. iter ( ) . flat_map ( |line| self . render_line ( line) ) . collect ( ) ;
@@ -563,7 +563,7 @@ impl FileInfo {
563
563
fn render_line ( & self , line : & Line ) -> Vec < RenderedLine > {
564
564
let source_string = self . file . get_line ( line. line_index )
565
565
. unwrap_or ( "" ) ;
566
- let source_kind = SourceText {
566
+ let source_kind = RLK :: SourceText {
567
567
file : self . file . clone ( ) ,
568
568
line_index : line. line_index ,
569
569
} ;
0 commit comments