From edf32ddd6813094b0865d98a53e0242a02d8c3fa Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 27 Oct 2022 11:22:38 -0600 Subject: [PATCH] Fix editor-test --- examples/editor-test/Cargo.toml | 3 --- examples/editor-test/src/main.rs | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/examples/editor-test/Cargo.toml b/examples/editor-test/Cargo.toml index 7564acb..f0ed9ce 100644 --- a/examples/editor-test/Cargo.toml +++ b/examples/editor-test/Cargo.toml @@ -13,6 +13,3 @@ fontdb = "0.9" log = "0.4" orbclient = "0.3.35" unicode-segmentation = "1.7" - -[features] -mono = [] diff --git a/examples/editor-test/src/main.rs b/examples/editor-test/src/main.rs index 617bfbb..413a6eb 100644 --- a/examples/editor-test/src/main.rs +++ b/examples/editor-test/src/main.rs @@ -60,10 +60,8 @@ fn main() { ]; let font_size_default = 1; // Body - let attrs = cosmic_text::Attrs::new().monospaced(cfg!(feature = "mono")); let mut buffer = TextBuffer::new( &font_system, - attrs, font_sizes[font_size_default] ); buffer.set_size( @@ -151,9 +149,8 @@ fn main() { log::info!("Test completed in {:?}", test_elapsed); let mut wrong = 0; - let buffer_lines = buffer.text_lines(); for (line_i, line) in text.lines().enumerate() { - let buffer_line = &buffer_lines[line_i]; + let buffer_line = &buffer.lines[line_i]; if buffer_line.text() != line { log::error!("line {}: {:?} != {:?}", line_i, buffer_line.text(), line); wrong += 1;