@@ -43,7 +43,7 @@ use crate::renderer::StyleSheet;
43
43
/// List of lines to be displayed.
44
44
pub struct DisplayList < ' a > {
45
45
pub body : Vec < DisplayLine < ' a > > ,
46
- pub stylesheet : StyleSheet ,
46
+ pub stylesheet : & ' a StyleSheet ,
47
47
pub anonymized_line_numbers : bool ,
48
48
pub margin : Option < Margin > ,
49
49
}
@@ -111,7 +111,7 @@ impl<'a> DisplayList<'a> {
111
111
footer,
112
112
slices,
113
113
} : snippet:: Snippet < ' a > ,
114
- stylesheet : StyleSheet ,
114
+ stylesheet : & ' a StyleSheet ,
115
115
anonymized_line_numbers : bool ,
116
116
margin : Option < Margin > ,
117
117
) -> DisplayList < ' a > {
@@ -1220,7 +1220,7 @@ mod tests {
1220
1220
fn from_display_lines ( lines : Vec < DisplayLine < ' _ > > ) -> DisplayList < ' _ > {
1221
1221
DisplayList {
1222
1222
body : lines,
1223
- stylesheet : STYLESHEET ,
1223
+ stylesheet : & STYLESHEET ,
1224
1224
anonymized_line_numbers : false ,
1225
1225
margin : None ,
1226
1226
}
@@ -1249,7 +1249,7 @@ mod tests {
1249
1249
source_aligned: false ,
1250
1250
continuation: false ,
1251
1251
} ) ] ) ;
1252
- assert_eq ! ( DisplayList :: new( input, STYLESHEET , false , None ) , output) ;
1252
+ assert_eq ! ( DisplayList :: new( input, & STYLESHEET , false , None ) , output) ;
1253
1253
}
1254
1254
1255
1255
#[ test]
@@ -1296,7 +1296,7 @@ mod tests {
1296
1296
line: DisplaySourceLine :: Empty ,
1297
1297
} ,
1298
1298
] ) ;
1299
- assert_eq ! ( DisplayList :: new( input, STYLESHEET , false , None ) , output) ;
1299
+ assert_eq ! ( DisplayList :: new( input, & STYLESHEET , false , None ) , output) ;
1300
1300
}
1301
1301
1302
1302
#[ test]
@@ -1373,7 +1373,7 @@ mod tests {
1373
1373
line: DisplaySourceLine :: Empty ,
1374
1374
} ,
1375
1375
] ) ;
1376
- assert_eq ! ( DisplayList :: new( input, STYLESHEET , false , None ) , output) ;
1376
+ assert_eq ! ( DisplayList :: new( input, & STYLESHEET , false , None ) , output) ;
1377
1377
}
1378
1378
1379
1379
#[ test]
@@ -1443,7 +1443,7 @@ mod tests {
1443
1443
line: DisplaySourceLine :: Empty ,
1444
1444
} ,
1445
1445
] ) ;
1446
- assert_eq ! ( DisplayList :: new( input, STYLESHEET , false , None ) , output) ;
1446
+ assert_eq ! ( DisplayList :: new( input, & STYLESHEET , false , None ) , output) ;
1447
1447
}
1448
1448
1449
1449
#[ test]
@@ -1469,7 +1469,7 @@ mod tests {
1469
1469
source_aligned: true ,
1470
1470
continuation: false ,
1471
1471
} ) ] ) ;
1472
- assert_eq ! ( DisplayList :: new( input, STYLESHEET , false , None ) , output) ;
1472
+ assert_eq ! ( DisplayList :: new( input, & STYLESHEET , false , None ) , output) ;
1473
1473
}
1474
1474
1475
1475
#[ test]
@@ -1492,7 +1492,7 @@ mod tests {
1492
1492
fold: false ,
1493
1493
} ] ,
1494
1494
} ;
1495
- let _ = DisplayList :: new ( input, STYLESHEET , false , None ) ;
1495
+ let _ = DisplayList :: new ( input, & STYLESHEET , false , None ) ;
1496
1496
}
1497
1497
1498
1498
#[ test]
@@ -1580,7 +1580,7 @@ mod tests {
1580
1580
} ,
1581
1581
] ) ;
1582
1582
assert_eq ! (
1583
- DisplayList :: new( snippets, STYLESHEET , false , None ) ,
1583
+ DisplayList :: new( snippets, & STYLESHEET , false , None ) ,
1584
1584
expected
1585
1585
) ;
1586
1586
}
0 commit comments