Skip to content

Commit

Permalink
Adapt to new cosmic-text
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Sep 6, 2024
1 parent 44407b8 commit 23397f6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions graphics/src/text/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -752,7 +750,6 @@ 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 @@ -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 +=
Expand Down

0 comments on commit 23397f6

Please sign in to comment.