From 8c30548f9e25443d407342771a8cb7dbcb830ad5 Mon Sep 17 00:00:00 2001 From: Elijah Potter Date: Sun, 14 Jan 2024 23:18:52 -0700 Subject: [PATCH] Minor things - Should squash --- english_words.txt | 6 ------ lt-core/benches/spellcheck.rs | 2 +- lt-core/src/linting/spell_check.rs | 2 +- web/src/lib/Underlines.svelte | 1 - web/src/routes/+page.svelte | 17 +++-------------- 5 files changed, 5 insertions(+), 23 deletions(-) diff --git a/english_words.txt b/english_words.txt index b9e15ccc..57d2697c 100644 --- a/english_words.txt +++ b/english_words.txt @@ -320399,12 +320399,6 @@ tezcatzoncatl tezcucan tezkere tezkirah -tfr -tg -tgn -tgt -th -tha thack thacked thacker diff --git a/lt-core/benches/spellcheck.rs b/lt-core/benches/spellcheck.rs index efa6165f..177d897a 100644 --- a/lt-core/benches/spellcheck.rs +++ b/lt-core/benches/spellcheck.rs @@ -11,7 +11,7 @@ fn criterion_benchmark(c: &mut Criterion) { let dictionary = Dictionary::new(); group.bench_function("dict create", |b| b.iter(Dictionary::new)); - group.bench_function("hello 5", |b| b.iter(|| spellcheck(&dictionary))); + group.bench_function("hello 5", |b| b.iter(|| spellcheck(dictionary))); } criterion_group!(benches, criterion_benchmark); diff --git a/lt-core/src/linting/spell_check.rs b/lt-core/src/linting/spell_check.rs index b028d487..f516649a 100644 --- a/lt-core/src/linting/spell_check.rs +++ b/lt-core/src/linting/spell_check.rs @@ -13,7 +13,7 @@ pub fn spell_check(document: &Document, _dictionary: &Dictionary) -> Vec { continue; } - let possibilities = suggest_correct_spelling(word_chars, 3, 3, &dictionary); + let possibilities = suggest_correct_spelling(word_chars, 3, 3, dictionary); let suggestions = possibilities .into_iter() diff --git a/web/src/lib/Underlines.svelte b/web/src/lib/Underlines.svelte index 2099f036..52e4a58c 100644 --- a/web/src/lib/Underlines.svelte +++ b/web/src/lib/Underlines.svelte @@ -25,7 +25,6 @@ if (output.length > 0) { output.push(undefined); } - console.log(chunk); output.push(chunk); } diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index eb74d967..27cb28b9 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -19,17 +19,6 @@ setTimeout(ping, 1000); } - type Category = 'mild' | 'moderate'; - - function categoryToColor(category: Category): string { - switch (category) { - case 'mild': - return '#708b75'; - case 'moderate': - return '#f3a712'; - } - } - ping(); $: console.log(focused); @@ -51,7 +40,7 @@ {#each lints as lint, i} (focused = i)}> -
+

{lint.lint_kind} - “ @@ -60,7 +49,7 @@

{lint.message}

{#each lint.suggestions as suggestion}