diff --git a/src/renderer/display_list.rs b/src/renderer/display_list.rs index 02e14a5..e7784db 100644 --- a/src/renderer/display_list.rs +++ b/src/renderer/display_list.rs @@ -766,7 +766,7 @@ fn format_slice( has_footer: bool, margin: Option, ) -> Vec> { - let main_range = slice.annotations.get(0).map(|x| x.range.0); + let main_range = slice.annotations.first().map(|x| x.range.0); let origin = slice.origin; let need_empty_header = origin.is_some() || is_first; let mut body = format_body(slice, need_empty_header, has_footer, margin);