@@ -6,26 +6,24 @@ use annotate_snippets::{
6
6
fn main ( ) {
7
7
let snippet = Snippet {
8
8
title : Some ( Annotation {
9
- label : Some ( "mismatched types" . to_string ( ) ) ,
10
- id : Some ( "E0308" . to_string ( ) ) ,
9
+ label : Some ( "mismatched types" ) ,
10
+ id : Some ( "E0308" ) ,
11
11
annotation_type : AnnotationType :: Error ,
12
12
} ) ,
13
13
footer : vec ! [ Annotation {
14
14
label: Some (
15
- "expected type: `snippet::Annotation`\n found type: `__&__snippet::Annotation`"
16
- . to_string( ) ,
15
+ "expected type: `snippet::Annotation`\n found type: `__&__snippet::Annotation`" ,
17
16
) ,
18
17
id: None ,
19
18
annotation_type: AnnotationType :: Note ,
20
19
} ] ,
21
20
slices : vec ! [ Slice {
22
- source: " slices: vec![\" A\" ," . to_string ( ) ,
21
+ source: " slices: vec![\" A\" ," ,
23
22
line_start: 13 ,
24
- origin: Some ( "src/multislice.rs" . to_string ( ) ) ,
23
+ origin: Some ( "src/multislice.rs" ) ,
25
24
fold: false ,
26
25
annotations: vec![ SourceAnnotation {
27
- label: "expected struct `annotate_snippets::snippet::Slice`, found reference"
28
- . to_string( ) ,
26
+ label: "expected struct `annotate_snippets::snippet::Slice`, found reference" ,
29
27
range: ( 21 , 24 ) ,
30
28
annotation_type: AnnotationType :: Error ,
31
29
} ] ,
0 commit comments