Skip to content

Commit

Permalink
Unrelated build error
Browse files Browse the repository at this point in the history
  • Loading branch information
acolombier committed Sep 8, 2024
1 parent d3a8b01 commit 1e48a5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion graphics/src/text/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ impl editor::Editor for Editor {

let layout = line
.layout_opt()
.expect("Line layout should be cached");
.as_ref()
.expect("Line layout should be cached")
.clone();

let mut lines = layout.iter().enumerate();

Expand Down Expand Up @@ -605,6 +607,7 @@ impl editor::Editor for Editor {
.find_map(|(i, line)| {
let layout = line
.layout_opt()
.as_ref()
.expect("Line layout should be cached");

let mut layout_height = 0.0;
Expand Down Expand Up @@ -750,6 +753,7 @@ fn highlight_line(
) -> impl Iterator<Item = (f32, f32)> + '_ {
let layout = line
.layout_opt()
.as_ref()
.expect("Line layout should be cached");

layout.iter().map(move |visual_line| {
Expand Down Expand Up @@ -805,6 +809,7 @@ fn visual_lines_offset(line: usize, buffer: &cosmic_text::Buffer) -> f32 {
.map(|line| {
let layout = line
.layout_opt()
.as_ref()
.expect("Line layout should be cached");
for layout_line in layout.iter() {
height_before_start +=
Expand Down

0 comments on commit 1e48a5c

Please sign in to comment.