File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -280,13 +280,15 @@ crate fn print_src(
280
280
tmp /= 10 ;
281
281
}
282
282
line_numbers. write_str ( "<pre class=\" line-numbers\" >" ) ;
283
- for i in 1 ..=lines {
284
- match source_context {
285
- SourceContext :: Standalone => {
286
- writeln ! ( line_numbers, "<span id=\" {0}\" >{0:1$}</span>" , i , cols)
283
+ match source_context {
284
+ SourceContext :: Standalone => {
285
+ for line in 1 ..=lines {
286
+ writeln ! ( line_numbers, "<span id=\" {0}\" >{0:1$}</span>" , line , cols)
287
287
}
288
- SourceContext :: Embedded { offset } => {
289
- writeln ! ( line_numbers, "<span>{0:1$}</span>" , i + offset, cols)
288
+ }
289
+ SourceContext :: Embedded { offset } => {
290
+ for line in 1 ..=lines {
291
+ writeln ! ( line_numbers, "<span>{0:1$}</span>" , line + offset, cols)
290
292
}
291
293
}
292
294
}
You can’t perform that action at this time.
0 commit comments