From e2eb68abcaacfca3e4fa1209ece1f2f17897b756 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Fri, 2 Aug 2024 20:08:57 +0200 Subject: [PATCH] chore: Remove leftover code from #15646 (#15697) Release Notes: - N/A --- Cargo.lock | 1 - crates/editor/Cargo.toml | 1 - crates/editor/src/editor_tests.rs | 57 ------------------------------- 3 files changed, 59 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa345fe052..56e8f1911e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3599,7 +3599,6 @@ dependencies = [ "time", "time_format", "tree-sitter-html", - "tree-sitter-md", "tree-sitter-rust", "tree-sitter-typescript", "ui", diff --git a/crates/editor/Cargo.toml b/crates/editor/Cargo.toml index 7eb3eb710e..8fb4e3be32 100644 --- a/crates/editor/Cargo.toml +++ b/crates/editor/Cargo.toml @@ -93,7 +93,6 @@ settings = { workspace = true, features = ["test-support"] } text = { workspace = true, features = ["test-support"] } theme = { workspace = true, features = ["test-support"] } tree-sitter-html.workspace = true -tree-sitter-md.workspace = true tree-sitter-rust.workspace = true tree-sitter-typescript.workspace = true unindent.workspace = true diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs index 6bd9157f20..ba563c26ea 100644 --- a/crates/editor/src/editor_tests.rs +++ b/crates/editor/src/editor_tests.rs @@ -3668,63 +3668,6 @@ fn test_duplicate_line(cx: &mut TestAppContext) { ); }); } -#[gpui::test] -async fn test_fold_perf(cx: &mut TestAppContext) { - use std::fmt::Write; - init_test(cx, |_| {}); - let mut view = EditorTestContext::new(cx).await; - let language_registry = view.language_registry(); - let language_name = Arc::from("Markdown"); - let md_language = Arc::new( - Language::new( - LanguageConfig { - name: Arc::clone(&language_name), - matcher: LanguageMatcher { - path_suffixes: vec!["md".to_string()], - ..Default::default() - }, - ..Default::default() - }, - Some(tree_sitter_md::language()), - ) - .with_highlights_query( - r#" - "#, - ) - .unwrap(), - ); - language_registry.add(md_language.clone()); - - let mut text = String::default(); - writeln!(&mut text, "start").unwrap(); - writeln!(&mut text, "```").unwrap(); - const LINE_COUNT: u32 = 10000; - for i in 0..LINE_COUNT { - writeln!(&mut text, "{i}").unwrap(); - } - - writeln!(&mut text, "```").unwrap(); - writeln!(&mut text, "end").unwrap(); - view.update_buffer(|buffer, cx| { - buffer.set_language(Some(md_language), cx); - }); - let t0 = Instant::now(); - _ = view.update_editor(|view, cx| { - eprintln!("Text length: {}", text.len()); - view.set_text(text, cx); - eprintln!(">>"); - view.fold_ranges( - vec![( - Point::new(1, 0)..Point::new(LINE_COUNT + 2, 3), - FoldPlaceholder::test(), - )], - false, - cx, - ); - }); - eprintln!("{:?}", t0.elapsed()); - eprintln!("<<"); -} #[gpui::test] fn test_move_line_up_down(cx: &mut TestAppContext) {