From 23397f6fc541d8d6b98b56999a59ad4f4255be95 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 6 Sep 2024 07:19:48 -0600 Subject: [PATCH] Adapt to new cosmic-text --- graphics/src/text/editor.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/graphics/src/text/editor.rs b/graphics/src/text/editor.rs index 9f933788b9..8be9842814 100644 --- a/graphics/src/text/editor.rs +++ b/graphics/src/text/editor.rs @@ -172,7 +172,6 @@ impl editor::Editor for Editor { let layout = line .layout_opt() - .as_ref() .expect("Line layout should be cached"); let mut lines = layout.iter().enumerate(); @@ -606,7 +605,6 @@ 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; @@ -752,7 +750,6 @@ fn highlight_line( ) -> impl Iterator + '_ { let layout = line .layout_opt() - .as_ref() .expect("Line layout should be cached"); layout.iter().map(move |visual_line| { @@ -808,7 +805,6 @@ 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 +=