Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
refactor: standardize on `.to_owned()` for `message` in linters (#3569)
Andrew Dunbarcfe297064f5c
diff --git a/harper-core/src/linting/a_some_time.rs b/harper-core/src/linting/a_some_time.rsindex 1ed0a1722..9fea5c0d5 100644--- a/harper-core/src/linting/a_some_time.rs+++ b/harper-core/src/linting/a_some_time.rs@@ -41,7 +41,7 @@ impl ExprLinter for ASomeTime {span: a_some_span,lint_kind: LintKind::Usage,suggestions,- message: "Remove the indefinite article `a` before `some`.".to_string(),+ message: "Remove the indefinite article `a` before `some`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/adjective_of_a.rs b/harper-core/src/linting/adjective_of_a.rsindex 00063bc2a..07f74039e 100644--- a/harper-core/src/linting/adjective_of_a.rs+++ b/harper-core/src/linting/adjective_of_a.rs@@ -146,7 +146,7 @@ impl Linter for AdjectiveOfA {span: Span::new(adjective.span.start, a_or_an.span.end),lint_kind: LintKind::Style,suggestions,- message: "The word `of` is not needed here.".to_string(),+ message: "The word `of` is not needed here.".to_owned(),priority: 63,});}diff --git a/harper-core/src/linting/after_later.rs b/harper-core/src/linting/after_later.rsindex d158fb40e..0e69b0098 100644--- a/harper-core/src/linting/after_later.rs+++ b/harper-core/src/linting/after_later.rs@@ -55,7 +55,7 @@ impl ExprLinter for AfterLater {Some(Lint {span: toks.span()?,lint_kind: LintKind::Redundancy,- message: "Don't use `later` following `after [a period of time]`".to_string(),+ message: "Don't use `later` following `after [a period of time]`".to_owned(),suggestions: vec![Suggestion::replace_with_match_case(without_after, template_chars),Suggestion::replace_with_match_case(without_later, template_chars),diff --git a/harper-core/src/linting/all_hell_break_loose.rs b/harper-core/src/linting/all_hell_break_loose.rsindex 9c75f79e8..ae8c65c21 100644--- a/harper-core/src/linting/all_hell_break_loose.rs+++ b/harper-core/src/linting/all_hell_break_loose.rs@@ -34,7 +34,7 @@ impl ExprLinter for AllHellBreakLoose {lint_kind: LintKind::Eggcorn,span: outspan,suggestions: vec![Suggestion::replace_with_match_case_str("loose", outchars)],- message: "The correct idiom is `all hell breaks loose`.".to_string(),+ message: "The correct idiom is `all hell breaks loose`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/an_a.rs b/harper-core/src/linting/an_a.rsindex 34f0b8656..c241208a9 100644--- a/harper-core/src/linting/an_a.rs+++ b/harper-core/src/linting/an_a.rs@@ -76,7 +76,7 @@ impl Linter for AnA {replacement,chars_first,)],- message: "Incorrect indefinite article.".to_string(),+ message: "Incorrect indefinite article.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/and_the_like.rs b/harper-core/src/linting/and_the_like.rsindex ac5c811bb..dfe798ed4 100644--- a/harper-core/src/linting/and_the_like.rs+++ b/harper-core/src/linting/and_the_like.rs@@ -60,7 +60,7 @@ impl ExprLinter for AndTheLike {corrected.chars().collect(),toks.span()?.get_content(src),)],- message: "If you intended the idiom meaning `similar things`, the correct form is with `the like`.".to_string(),+ message: "If you intended the idiom meaning `similar things`, the correct form is with `the like`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/another_thing_coming.rs b/harper-core/src/linting/another_thing_coming.rsindex 87026e265..06e5d867e 100644--- a/harper-core/src/linting/another_thing_coming.rs+++ b/harper-core/src/linting/another_thing_coming.rs@@ -34,7 +34,7 @@ impl ExprLinter for AnotherThingComing {"another thing coming",toks.span()?.get_content(src),)],- message: "Corrects `another think coming` to `another thing coming`".to_string(),+ message: "Corrects `another think coming` to `another thing coming`".to_owned(),priority: 63,})}diff --git a/harper-core/src/linting/another_think_coming.rs b/harper-core/src/linting/another_think_coming.rsindex d395b7660..9fbd4d0f1 100644--- a/harper-core/src/linting/another_think_coming.rs+++ b/harper-core/src/linting/another_think_coming.rs@@ -34,7 +34,7 @@ impl ExprLinter for AnotherThinkComing {"another think coming",toks.span()?.get_content(src),)],- message: "Corrects `another thing coming` to `another think coming`".to_string(),+ message: "Corrects `another thing coming` to `another think coming`".to_owned(),priority: 63,})}diff --git a/harper-core/src/linting/arrive_to.rs b/harper-core/src/linting/arrive_to.rsindex 9653ac16d..3c4fcc2f6 100644--- a/harper-core/src/linting/arrive_to.rs+++ b/harper-core/src/linting/arrive_to.rs@@ -41,7 +41,7 @@ impl ExprLinter for ArriveTo {span,lint_kind: LintKind::Usage,suggestions,- message: "If the noun is a destination, use 'at' or 'in' instead of 'to'.".to_string(),+ message: "If the noun is a destination, use 'at' or 'in' instead of 'to'.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/aspire_to.rs b/harper-core/src/linting/aspire_to.rsindex e4215812c..5eed71fd5 100644--- a/harper-core/src/linting/aspire_to.rs+++ b/harper-core/src/linting/aspire_to.rs@@ -74,7 +74,7 @@ impl ExprLinter for AspireTo {"to",prep_s.get_content(src),)],- message: "Use `aspire to` instead of `aspire for`.".to_string(),+ message: "Use `aspire to` instead of `aspire for`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/avoid_contractions.rs b/harper-core/src/linting/avoid_contractions.rsindex 4451ecadf..d12bf1138 100644--- a/harper-core/src/linting/avoid_contractions.rs+++ b/harper-core/src/linting/avoid_contractions.rs@@ -144,7 +144,7 @@ impl ExprLinter for AvoidContractions {expansion,tok.get_ch(src),)],- message: "Consider expanding this contraction.".to_string(),+ message: "Consider expanding this contraction.".to_owned(),priority: 63,})}diff --git a/harper-core/src/linting/avoid_curses.rs b/harper-core/src/linting/avoid_curses.rsindex b841eb92a..fdd70b8b9 100644--- a/harper-core/src/linting/avoid_curses.rs+++ b/harper-core/src/linting/avoid_curses.rs@@ -238,7 +238,7 @@ impl ExprLinter for AvoidCurses {span,lint_kind: LintKind::WordChoice,suggestions,- message: "Try to avoid offensive language.".to_string(),+ message: "Try to avoid offensive language.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/behind_the_scenes.rs b/harper-core/src/linting/behind_the_scenes.rsindex 868b9df19..0b8998b37 100644--- a/harper-core/src/linting/behind_the_scenes.rs+++ b/harper-core/src/linting/behind_the_scenes.rs@@ -52,7 +52,7 @@ impl ExprLinter for BehindTheScenes {span.get_content(src),)].to_vec(),- message: "This idiom uses the plural `scenes`.".to_string(),+ message: "This idiom uses the plural `scenes`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/best_of_all_time.rs b/harper-core/src/linting/best_of_all_time.rsindex 4c8873e65..0d8854865 100644--- a/harper-core/src/linting/best_of_all_time.rs+++ b/harper-core/src/linting/best_of_all_time.rs@@ -55,7 +55,7 @@ impl ExprLinter for BestOfAllTime {span: times_span,lint_kind: LintKind::WordChoice,suggestions: vec![Suggestion::ReplaceWith(time_singular.to_vec())],- message: "This expression uses singular `time`".to_string(),+ message: "This expression uses singular `time`".to_owned(),..Default::default()});}diff --git a/harper-core/src/linting/brand_brandish.rs b/harper-core/src/linting/brand_brandish.rsindex 572fef9b2..acba68c05 100644--- a/harper-core/src/linting/brand_brandish.rs+++ b/harper-core/src/linting/brand_brandish.rs@@ -58,7 +58,7 @@ impl ExprLinter for BrandBrandish {},verb_chars,)],- message: "`Brandish` means to wield a weapon. You probably mean `brand`.".to_string(),+ message: "`Brandish` means to wield a weapon. You probably mean `brand`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/by_accident.rs b/harper-core/src/linting/by_accident.rsindex 2b0967ee5..d22221e45 100644--- a/harper-core/src/linting/by_accident.rs+++ b/harper-core/src/linting/by_accident.rs@@ -46,7 +46,7 @@ impl ExprLinter for ByAccident {span,lint_kind: LintKind::Usage,suggestions,- message: "Did you mean `by accident`?".to_string(),+ message: "Did you mean `by accident`?".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/by_the_book.rs b/harper-core/src/linting/by_the_book.rsindex 2662fe797..8466ef569 100644--- a/harper-core/src/linting/by_the_book.rs+++ b/harper-core/src/linting/by_the_book.rs@@ -54,7 +54,7 @@ impl ExprLinter for ByTheBook {"book",span.get_content(src),)],- message: "Did you mean the idiom `by the book`?".to_string(),+ message: "Did you mean the idiom `by the book`?".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/cant.rs b/harper-core/src/linting/cant.rsindex b3dc7985d..fd3f071bb 100644--- a/harper-core/src/linting/cant.rs+++ b/harper-core/src/linting/cant.rs@@ -50,7 +50,7 @@ impl ExprLinter for Cant {span: token.span,lint_kind: LintKind::Enhancement,suggestions: vec![Suggestion::replace_with_match_case_str(cannot, jargon)],- message: "`Cant` is secret language or jargon. If that's not what you mean you should use `can't` here.".to_string(),+ message: "`Cant` is secret language or jargon. If that's not what you mean you should use `can't` here.".to_owned(),priority: 127,})}diff --git a/harper-core/src/linting/correct_number_suffix.rs b/harper-core/src/linting/correct_number_suffix.rsindex 0b8a581b8..f5c702b20 100644--- a/harper-core/src/linting/correct_number_suffix.rs+++ b/harper-core/src/linting/correct_number_suffix.rs@@ -26,7 +26,7 @@ impl Linter for CorrectNumberSuffix {output.push(Lint {span: suffix_span,lint_kind: LintKind::Miscellaneous,- message: "This number needs a different suffix to sound right.".to_string(),+ message: "This number needs a different suffix to sound right.".to_owned(),suggestions: vec![Suggestion::ReplaceWith(correct_suffix.to_chars().to_vec())],..Default::default()})diff --git a/harper-core/src/linting/crave_for.rs b/harper-core/src/linting/crave_for.rsindex 5b27be19b..611915416 100644--- a/harper-core/src/linting/crave_for.rs+++ b/harper-core/src/linting/crave_for.rs@@ -46,7 +46,7 @@ impl ExprLinter for CraveFor {span,lint_kind: LintKind::Usage,suggestions: vec![Suggestion::Remove],- message: "The verb `crave` should not be followed by `for`.".to_string(),+ message: "The verb `crave` should not be followed by `for`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/currency_placement.rs b/harper-core/src/linting/currency_placement.rsindex a89317c2e..896fec3b9 100644--- a/harper-core/src/linting/currency_placement.rs+++ b/harper-core/src/linting/currency_placement.rs@@ -52,7 +52,7 @@ fn generate_lint_for_tokens(a: &Token, b: &Token, document: &Document) -> Optionspan,lint_kind: LintKind::Formatting,suggestions: vec![Suggestion::ReplaceWith(correct)],- message: "The position of the currency symbol matters.".to_string(),+ message: "The position of the currency symbol matters.".to_owned(),priority: 63,})} else {diff --git a/harper-core/src/linting/damages.rs b/harper-core/src/linting/damages.rsindex 642b5ef22..be74e3420 100644--- a/harper-core/src/linting/damages.rs+++ b/harper-core/src/linting/damages.rs@@ -152,7 +152,7 @@ impl ExprLinter for Damages {damage_chars[..6].to_vec(),damage_chars,)],- message: "Singular `damage` is correct when not referring to a court case.".to_string(),+ message: "Singular `damage` is correct when not referring to a court case.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/day_and_age.rs b/harper-core/src/linting/day_and_age.rsindex 319f32a9e..5f0619a92 100644--- a/harper-core/src/linting/day_and_age.rs+++ b/harper-core/src/linting/day_and_age.rs@@ -107,7 +107,7 @@ impl ExprLinter for DayAndAge {replacement.chars().collect(),span.get_content(src),)],- message: "The correct idiom is `in this day and age`.".to_string(),+ message: "The correct idiom is `in this day and age`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/despite_of.rs b/harper-core/src/linting/despite_of.rsindex a8db1dbe0..0907b2ef4 100644--- a/harper-core/src/linting/despite_of.rs+++ b/harper-core/src/linting/despite_of.rs@@ -37,7 +37,7 @@ impl ExprLinter for DespiteOf {Suggestion::replace_with_match_case_str("despite", matched),Suggestion::replace_with_match_case_str("in spite of", matched)],- message: "The phrase “despite of” is incorrect. Please use either “despite” or “in spite of” instead.".to_string(),+ message: "The phrase “despite of” is incorrect. Please use either “despite” or “in spite of” instead.".to_owned(),priority: 126,})}diff --git a/harper-core/src/linting/did_past.rs b/harper-core/src/linting/did_past.rsindex 79973b14c..e5ecc33c1 100644--- a/harper-core/src/linting/did_past.rs+++ b/harper-core/src/linting/did_past.rs@@ -106,7 +106,7 @@ where.into_iter().map(|s| Suggestion::replace_with_match_case(s, vchars)).collect(),- message: "Use the base form of the verb with \"did\".".to_string(),+ message: "Use the base form of the verb with \"did\".".to_owned(),..Default::default()})} else {diff --git a/harper-core/src/linting/didnt.rs b/harper-core/src/linting/didnt.rsindex acb99985e..552fa3021 100644--- a/harper-core/src/linting/didnt.rs+++ b/harper-core/src/linting/didnt.rs@@ -35,7 +35,7 @@ impl ExprLinter for Didnt {"didn't",suspect.get_ch(src),)],- message: "Consider using `didn't` here.".to_string(),+ message: "Consider using `didn't` here.".to_owned(),priority: 63,})}diff --git a/harper-core/src/linting/do_mistake.rs b/harper-core/src/linting/do_mistake.rsindex 69cdc914e..ad0e20678 100644--- a/harper-core/src/linting/do_mistake.rs+++ b/harper-core/src/linting/do_mistake.rs@@ -78,7 +78,7 @@ impl ExprLinter for DoMistake {span,lint_kind: LintKind::Usage,suggestions: vec![Suggestion::replace_with_match_case(make, chars)],- message: "In English we `make` mistakes, not `do` them".to_string(),+ message: "In English we `make` mistakes, not `do` them".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/double_modal.rs b/harper-core/src/linting/double_modal.rsindex 769c802a8..3c69e26b1 100644--- a/harper-core/src/linting/double_modal.rs+++ b/harper-core/src/linting/double_modal.rs@@ -39,7 +39,7 @@ impl ExprLinter for DoubleModal {Suggestion::ReplaceWith(first_chars.into()),Suggestion::ReplaceWith(second_chars.into()),],- message: "Two modal verbs in a row are rarely grammatical; remove one.".to_string(),+ message: "Two modal verbs in a row are rarely grammatical; remove one.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/ellipsis_length.rs b/harper-core/src/linting/ellipsis_length.rsindex adee68447..76bcafa5c 100644--- a/harper-core/src/linting/ellipsis_length.rs+++ b/harper-core/src/linting/ellipsis_length.rs@@ -27,7 +27,7 @@ impl Linter for EllipsisLength {span: tok.span,lint_kind: LintKind::Formatting,suggestions: vec![Suggestion::ReplaceWith(vec!['.', '.', '.'])],- message: "Horizontal ellipsis must have 3 dots.".to_string(),+ message: "Horizontal ellipsis must have 3 dots.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/ever_every.rs b/harper-core/src/linting/ever_every.rsindex 2d58de19c..a6b2b1356 100644--- a/harper-core/src/linting/ever_every.rs+++ b/harper-core/src/linting/ever_every.rs@@ -47,7 +47,7 @@ impl ExprLinter for EverEvery {content[..content.len() - 1].to_vec(),content,)],- message: "Is this `every` a typo that should be `ever`?".to_string(),+ message: "Is this `every` a typo that should be `ever`?".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/expand_people.rs b/harper-core/src/linting/expand_people.rsindex 98b904e9e..6708b4178 100644--- a/harper-core/src/linting/expand_people.rs+++ b/harper-core/src/linting/expand_people.rs@@ -27,7 +27,7 @@ impl ExprLinter for ExpandPeople {"people",span.get_content(src),)];- let message = "Use `people` instead of `ppl`.".to_string();+ let message = "Use `people` instead of `ppl`.".to_owned();Some(Lint {span,lint_kind,diff --git a/harper-core/src/linting/expr_linter.rs b/harper-core/src/linting/expr_linter.rsindex 675231e3f..196b4285a 100644--- a/harper-core/src/linting/expr_linter.rs+++ b/harper-core/src/linting/expr_linter.rs@@ -213,7 +213,7 @@ mod tests_context {fn match_to_lint(&self, toks: &[Token], _src: &[char]) -> Option<Lint> {Some(Lint {span: toks.span()?,- message: "simple".to_string(),+ message: "simple".to_owned(),suggestions: vec![Suggestion::ReplaceWith(vec!['2'])],..Default::default()})@@ -257,21 +257,18 @@ mod tests_context {&& after.eq_ignore_ascii_case(" three"){(- "ascending".to_string(),+ "ascending".to_owned(),vec![Suggestion::ReplaceWith(vec!['>'])],)} else if before.eq_ignore_ascii_case("three ")&& after.eq_ignore_ascii_case(" one"){(- "descending".to_string(),+ "descending".to_owned(),vec![Suggestion::ReplaceWith(vec!['<'])],)} else {- (- "dunno".to_string(),- vec![Suggestion::ReplaceWith(vec!['?'])],- )+ ("dunno".to_owned(), vec![Suggestion::ReplaceWith(vec!['?'])])};return Some(Lint {@@ -312,7 +309,7 @@ mod tests_context {fn match_to_lint(&self, toks: &[Token], _src: &[char]) -> Option<Lint> {Some(Lint {span: toks.span()?,- message: "sentence".to_string(),+ message: "sentence".to_owned(),suggestions: vec![Suggestion::ReplaceWith(vec!['2', '&', '2'])],..Default::default()})diff --git a/harper-core/src/linting/far_be_it.rs b/harper-core/src/linting/far_be_it.rsindex 7f6d0bf51..71593a2f3 100644--- a/harper-core/src/linting/far_be_it.rs+++ b/harper-core/src/linting/far_be_it.rs@@ -41,10 +41,10 @@ impl ExprLinter for FarBeIt {vec!['f', 'r', 'o', 'm'],content,)],- "`Far be it for` is a common error for `far be it from`".to_string(),+ "`Far be it for` is a common error for `far be it from`".to_owned(),)} else {- (vec![], "The correct usage of the idiom is `far be it from` [someone] to [do something]. Try to rephrase the sentence.".to_string())+ (vec![], "The correct usage of the idiom is `far be it from` [someone] to [do something]. Try to rephrase the sentence.".to_owned())};Some(Lint {diff --git a/harper-core/src/linting/fed_up_with.rs b/harper-core/src/linting/fed_up_with.rsindex f974ecc05..3a7753d8f 100644--- a/harper-core/src/linting/fed_up_with.rs+++ b/harper-core/src/linting/fed_up_with.rs@@ -39,7 +39,7 @@ impl ExprLinter for FedUpWith {"with",ofspan.get_content(src),)],- message: "`Fed up of` is not accepted outside of British English.".to_string(),+ message: "`Fed up of` is not accepted outside of British English.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/feel_fell.rs b/harper-core/src/linting/feel_fell.rsindex 343de91cd..a3ed698f6 100644--- a/harper-core/src/linting/feel_fell.rs+++ b/harper-core/src/linting/feel_fell.rs@@ -57,7 +57,7 @@ impl ExprLinter for FeelFell {"feel",fell_token.get_ch(src),)],- message: "It looks like this is a typo, did you mean `feel`?".to_string(),+ message: "It looks like this is a typo, did you mean `feel`?".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/fellow_co_redundancy.rs b/harper-core/src/linting/fellow_co_redundancy.rsindex 08cd7843b..6bb25a577 100644--- a/harper-core/src/linting/fellow_co_redundancy.rs+++ b/harper-core/src/linting/fellow_co_redundancy.rs@@ -93,7 +93,7 @@ impl ExprLinter for FellowCoRedundancy {Suggestion::ReplaceWith(cf.iter().chain(worker.iter()).copied().collect())}).into(),- message: "Using `fellow` with `co` is redundant.".to_string(),+ message: "Using `fellow` with `co` is redundant.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/filler_words.rs b/harper-core/src/linting/filler_words.rsindex fe046b5e8..d5dd8a7b9 100644--- a/harper-core/src/linting/filler_words.rs+++ b/harper-core/src/linting/filler_words.rs@@ -37,7 +37,7 @@ impl ExprLinter for FillerWords {span: toks.span()?,lint_kind: LintKind::Miscellaneous,suggestions: vec![Suggestion::Remove],- message: "Remove this unnecessary filler word.".to_string(),+ message: "Remove this unnecessary filler word.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/first_aid_kit.rs b/harper-core/src/linting/first_aid_kit.rsindex ee7ba5fe4..65d537e61 100644--- a/harper-core/src/linting/first_aid_kit.rs+++ b/harper-core/src/linting/first_aid_kit.rs@@ -39,7 +39,7 @@ impl ExprLinter for FirstAidKit {"kit".chars().collect(),typo_text,)],- message: "Did you mean `kit` (a set of items) instead of “kid”?".to_string(),+ message: "Did you mean `kit` (a set of items) instead of “kid”?".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/flesh_out_vs_full_fledged.rs b/harper-core/src/linting/flesh_out_vs_full_fledged.rsindex fd633af18..7cd102286 100644--- a/harper-core/src/linting/flesh_out_vs_full_fledged.rs+++ b/harper-core/src/linting/flesh_out_vs_full_fledged.rs@@ -132,7 +132,7 @@ impl ExprLinter for FleshOutVsFullFledged {.collect(),verb_and_sep_span.get_content(src),)],- message: "This idiom uses the word `fledged`.".to_string(),+ message: "This idiom uses the word `fledged`.".to_owned(),..Default::default()})}@@ -149,7 +149,7 @@ impl ExprLinter for FleshOutVsFullFledged {},vtok_chars,)],- message: "This idiom uses the word `flesh`.".to_string(),+ message: "This idiom uses the word `flesh`.".to_owned(),..Default::default()}),// TODO: only with "fully" and not "full"?@@ -168,7 +168,7 @@ impl ExprLinter for FleshOutVsFullFledged {vtok_chars,),],- message: "Perhaps you're confusing `fully fledged` and `fleshed out`?".to_string(),+ message: "Perhaps you're confusing `fully fledged` and `fleshed out`?".to_owned(),..Default::default()}),_ => None,diff --git a/harper-core/src/linting/for_free_of_charge.rs b/harper-core/src/linting/for_free_of_charge.rsindex a3e8a17c4..b27a5514f 100644--- a/harper-core/src/linting/for_free_of_charge.rs+++ b/harper-core/src/linting/for_free_of_charge.rs@@ -50,7 +50,7 @@ impl ExprLinter for ForFreeOfCharge {Suggestion::replace_with_match_case_str("for free", span.get_content(source)),Suggestion::replace_with_match_case_str("free of charge", span.get_content(source)),],- message: "Use only either `for free` or `free of charge`".to_string(),+ message: "Use only either `for free` or `free of charge`".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/go_so_far_as_to.rs b/harper-core/src/linting/go_so_far_as_to.rsindex b4b6e247f..f2d27c5ba 100644--- a/harper-core/src/linting/go_so_far_as_to.rs+++ b/harper-core/src/linting/go_so_far_as_to.rs@@ -63,7 +63,7 @@ impl ExprLinter for GoSoFarAsTo {span: go_so_far_to_span,lint_kind: LintKind::Nonstandard,suggestions: vec![sugg],- message: "If this is intended to express going beyond what's expected, the standard idiom is `go so far as to`".to_string(),+ message: "If this is intended to express going beyond what's expected, the standard idiom is `go so far as to`".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/go_to_war.rs b/harper-core/src/linting/go_to_war.rsindex f528baaac..6c0683de0 100644--- a/harper-core/src/linting/go_to_war.rs+++ b/harper-core/src/linting/go_to_war.rs@@ -45,7 +45,7 @@ impl ExprLinter for GoToWar {span: prep_span,lint_kind: LintKind::Usage,suggestions: vec![Suggestion::replace_with_match_case_str("to", prep_chars)],- message: "Use `to` instead of `at`.".to_string(),+ message: "Use `to` instead of `at`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/good_at.rs b/harper-core/src/linting/good_at.rsindex 43eff4de6..4c32cd1bd 100644--- a/harper-core/src/linting/good_at.rs+++ b/harper-core/src/linting/good_at.rs@@ -86,7 +86,7 @@ impl ExprLinter for GoodAt {"at".chars().collect(),prep_span.get_content(src),)],- message: "Use 'good at' to describe proficiency with a skill.".to_string(),+ message: "Use 'good at' to describe proficiency with a skill.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/hedging.rs b/harper-core/src/linting/hedging.rsindex 18cb7462f..b04b75a50 100644--- a/harper-core/src/linting/hedging.rs+++ b/harper-core/src/linting/hedging.rs@@ -38,7 +38,7 @@ impl ExprLinter for Hedging {span,lint_kind: LintKind::Miscellaneous,suggestions: Vec::new(),- message: "You're hedging.".to_string(),+ message: "You're hedging.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/hop_hope/to_hope.rs b/harper-core/src/linting/hop_hope/to_hope.rsindex 44dfec7fe..3caabc270 100644--- a/harper-core/src/linting/hop_hope/to_hope.rs+++ b/harper-core/src/linting/hop_hope/to_hope.rs@@ -42,7 +42,7 @@ impl ExprLinter for ToHope {char_string!("hope").to_vec(),word_chars,)],- message: "Did you mean to use 'hope' instead of 'hop' in this context?".to_string(),+ message: "Did you mean to use 'hope' instead of 'hop' in this context?".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/i_am_agreement.rs b/harper-core/src/linting/i_am_agreement.rsindex 05b36c34f..c019f6be0 100644--- a/harper-core/src/linting/i_am_agreement.rs+++ b/harper-core/src/linting/i_am_agreement.rs@@ -45,7 +45,7 @@ impl ExprLinter for IAmAgreement {"I am".chars().collect(),toks.span()?.get_content(src),)],- message: "The first-person singular pronoun `I` requires the verb form `am`; `are` belongs to second-person or plural contexts.".to_string(),+ message: "The first-person singular pronoun `I` requires the verb form `am`; `are` belongs to second-person or plural contexts.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/if_wouldve.rs b/harper-core/src/linting/if_wouldve.rsindex 8cf5d7681..a2b36e140 100644--- a/harper-core/src/linting/if_wouldve.rs+++ b/harper-core/src/linting/if_wouldve.rs@@ -86,7 +86,7 @@ impl ExprLinter for IfWouldve {vec!['h', 'a', 'd'],span.get_content(src),)],- message: "If this is counterfactual or hypothetical, use `had` after `if` rather than `would have` or `had have`.".to_string(),+ message: "If this is counterfactual or hypothetical, use `had` after `if` rather than `would have` or `had have`.".to_owned(),..Default::default()})})diff --git a/harper-core/src/linting/in_favour_of_doing.rs b/harper-core/src/linting/in_favour_of_doing.rsindex 7b129f5a8..5da8cfaea 100644--- a/harper-core/src/linting/in_favour_of_doing.rs+++ b/harper-core/src/linting/in_favour_of_doing.rs@@ -30,7 +30,7 @@ impl ExprLinter for InFavourOfDoing {span: toks[fav_idx].span,lint_kind: LintKind::Usage,suggestions: vec![Suggestion::InsertAfter(" of".chars().collect())],- message: "The word `of` is missing.".to_string(),+ message: "The word `of` is missing.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/in_time_from_now.rs b/harper-core/src/linting/in_time_from_now.rsindex 1623dea72..faebc85c0 100644--- a/harper-core/src/linting/in_time_from_now.rs+++ b/harper-core/src/linting/in_time_from_now.rs@@ -58,7 +58,7 @@ impl ExprLinter for InTimeFromNow {Some(Lint {span: toks.span()?,lint_kind: LintKind::Redundancy,- message: "Avoid redundancy by using either `in [period of time]` or `[period of time] from now`, but not both together.".to_string(),+ message: "Avoid redundancy by using either `in [period of time]` or `[period of time] from now`, but not both together.".to_owned(),suggestions: vec![Suggestion::replace_with_match_case(without_in, template_chars),Suggestion::replace_with_match_case(without_from_now, template_chars),diff --git a/harper-core/src/linting/inflected_verb_after_to.rs b/harper-core/src/linting/inflected_verb_after_to.rsindex a8dd44b8a..610fa162d 100644--- a/harper-core/src/linting/inflected_verb_after_to.rs+++ b/harper-core/src/linting/inflected_verb_after_to.rs@@ -55,7 +55,7 @@ impl<T: Dictionary> Linter for InflectedVerbAfterTo<T> {lints.push(Lint {span: Span::new(prep.span.start, word.span.end),lint_kind: LintKind::WordChoice,- message: "The base form of the verb is needed here.".to_string(),+ message: "The base form of the verb is needed here.".to_owned(),suggestions: vec![Suggestion::ReplaceWith(prep_to.iter()diff --git a/harper-core/src/linting/interested_in.rs b/harper-core/src/linting/interested_in.rsindex b28e0fdeb..81a44f648 100644--- a/harper-core/src/linting/interested_in.rs+++ b/harper-core/src/linting/interested_in.rs@@ -45,7 +45,7 @@ impl ExprLinter for InterestedIn {"in".chars().collect(),prep_chars,)],- message: "The correct preposition to use with `interested` is `in`.".to_string(),+ message: "The correct preposition to use with `interested` is `in`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/it_looks_like_that.rs b/harper-core/src/linting/it_looks_like_that.rsindex b19dea4cd..4a0e2809a 100644--- a/harper-core/src/linting/it_looks_like_that.rs+++ b/harper-core/src/linting/it_looks_like_that.rs@@ -54,7 +54,7 @@ impl ExprLinter for ItLooksLikeThat {span: that_span,lint_kind: LintKind::Redundancy,suggestions: vec![Suggestion::Remove],- message: "`that` is redundant and ungrammatical here".to_string(),+ message: "`that` is redundant and ungrammatical here".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/its_possessive.rs b/harper-core/src/linting/its_possessive.rsindex e1c88cd6b..03c09b5c0 100644--- a/harper-core/src/linting/its_possessive.rs+++ b/harper-core/src/linting/its_possessive.rs@@ -140,7 +140,7 @@ impl ExprLinter for ItsPossessive {"its",span.get_content(source),)],- message: "Use the possessive pronoun `its` (without an apostrophe) to show ownership. The word `it's` (with an apostrophe) is a contraction of 'it is' or 'it has' and should not be used to indicate possession.".to_string(),+ message: "Use the possessive pronoun `its` (without an apostrophe) to show ownership. The word `it's` (with an apostrophe) is a contraction of 'it is' or 'it has' and should not be used to indicate possession.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/lead_rise_to.rs b/harper-core/src/linting/lead_rise_to.rsindex a349fbe17..814d1f789 100644--- a/harper-core/src/linting/lead_rise_to.rs+++ b/harper-core/src/linting/lead_rise_to.rs@@ -62,7 +62,7 @@ impl ExprLinter for LeadRiseTo {span: lspan,lint_kind: LintKind::Usage,suggestions,- message: "The correct idiom is `give rise to`.".to_string(),+ message: "The correct idiom is `give rise to`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/let_to_do.rs b/harper-core/src/linting/let_to_do.rsindex dcbce3ea6..3693de017 100644--- a/harper-core/src/linting/let_to_do.rs+++ b/harper-core/src/linting/let_to_do.rs@@ -56,7 +56,7 @@ impl ExprLinter for LetToDo {span: toks[toks.len() - 2..].span()?,lint_kind: LintKind::Usage,suggestions: vec![Suggestion::Remove],- message: "The word `to` should not be used with `let` in this way.".to_string(),+ message: "The word `to` should not be used with `let` in this way.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/lets_confusion/let_us_redundancy.rs b/harper-core/src/linting/lets_confusion/let_us_redundancy.rsindex e4a8a42af..7b65f1638 100644--- a/harper-core/src/linting/lets_confusion/let_us_redundancy.rs+++ b/harper-core/src/linting/lets_confusion/let_us_redundancy.rs@@ -43,10 +43,7 @@ impl ExprLinter for LetUsRedundancy {format!("lets {pronoun}").chars().collect(),template,),- Suggestion::replace_with_match_case(- "let's".to_string().chars().collect(),- template,- ),+ Suggestion::replace_with_match_case("let's".chars().collect(), template),],message: "`let's` stands for `let us`, so including another pronoun is redundant.".to_owned(),diff --git a/harper-core/src/linting/long_time_ago.rs b/harper-core/src/linting/long_time_ago.rsindex b255fc06a..fe7a1a149 100644--- a/harper-core/src/linting/long_time_ago.rs+++ b/harper-core/src/linting/long_time_ago.rs@@ -41,7 +41,7 @@ impl ExprLinter for LongTimeAgo {"a long time ago",span.get_content(source),)],- message: "The correct phrase is `a long time ago`.".to_string(),+ message: "The correct phrase is `a long time ago`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/look_down_ones_nose.rs b/harper-core/src/linting/look_down_ones_nose.rsindex e09ad223a..2dce8dce8 100644--- a/harper-core/src/linting/look_down_ones_nose.rs+++ b/harper-core/src/linting/look_down_ones_nose.rs@@ -47,7 +47,7 @@ impl ExprLinter for LookDownOnesNose {.collect(),toks.span()?.get_content(src),)],- message: "The correct idiom is `look down one's nose`.".to_string(),+ message: "The correct idiom is `look down one's nose`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/missing_to.rs b/harper-core/src/linting/missing_to.rsindex 4088f932c..5aa4e78e6 100644--- a/harper-core/src/linting/missing_to.rs+++ b/harper-core/src/linting/missing_to.rs@@ -407,7 +407,7 @@ impl ExprLinter for MissingTo {span,lint_kind: LintKind::WordChoice,suggestions: vec![Suggestion::InsertAfter(" to".chars().collect())],- message: "Insert `to` to complete the infinitive (e.g., `need to talk`).".to_string(),+ message: "Insert `to` to complete the infinitive (e.g., `need to talk`).".to_owned(),priority: 62,})}diff --git a/harper-core/src/linting/misspell.rs b/harper-core/src/linting/misspell.rsindex 6dcc0bbef..bdef1cd47 100644--- a/harper-core/src/linting/misspell.rs+++ b/harper-core/src/linting/misspell.rs@@ -58,7 +58,7 @@ impl ExprLinter for Misspell {span,lint_kind: LintKind::BoundaryError,suggestions,- message: "Write `misspell` and its inflections as a single word.".to_string(),+ message: "Write `misspell` and its inflections as a single word.".to_owned(),priority: 63,})}diff --git a/harper-core/src/linting/mixed_bag.rs b/harper-core/src/linting/mixed_bag.rsindex d0677a73c..1933c3bf9 100644--- a/harper-core/src/linting/mixed_bag.rs+++ b/harper-core/src/linting/mixed_bag.rs@@ -47,7 +47,7 @@ impl ExprLinter for MixedBag {"bag",bad_span.get_content(src),)],- message: "Corrects the eggcorn `mixed bad` to `mixed bag`.".to_string(),+ message: "Corrects the eggcorn `mixed bad` to `mixed bag`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/mod.rs b/harper-core/src/linting/mod.rsindex 763c79104..f89f7d744 100644--- a/harper-core/src/linting/mod.rs+++ b/harper-core/src/linting/mod.rs@@ -443,7 +443,7 @@ pub mod tests {span: *ws,lint_kind: LintKind::Spelling,suggestions,- message: "Test linter for 'linting assertion' tests".to_string(),+ message: "Test linter for 'linting assertion' tests".to_owned(),..Default::default()}})diff --git a/harper-core/src/linting/modal_of.rs b/harper-core/src/linting/modal_of.rsindex 52e316ec7..5b195c90b 100644--- a/harper-core/src/linting/modal_of.rs+++ b/harper-core/src/linting/modal_of.rs@@ -118,7 +118,7 @@ impl ExprLinter for ModalOf {modal_have,span_modal_of.get_content(source_chars),)],- message: "Use `have` rather than `of` here.".to_string(),+ message: "Use `have` rather than `of` here.".to_owned(),priority: 126,})}diff --git a/harper-core/src/linting/months.rs b/harper-core/src/linting/months.rsindex 881e92c12..116872651 100644--- a/harper-core/src/linting/months.rs+++ b/harper-core/src/linting/months.rs@@ -111,7 +111,7 @@ impl ExprLinter for Months {span: month_tok.span,lint_kind: LintKind::Miscellaneous,suggestions: vec![Suggestion::ReplaceWith(month_vec)],- message: "Months should be written with a capital letter.".to_string(),+ message: "Months should be written with a capital letter.".to_owned(),priority: 126,})}diff --git a/harper-core/src/linting/most_of_the_times.rs b/harper-core/src/linting/most_of_the_times.rsindex a6137553a..4376c1f08 100644--- a/harper-core/src/linting/most_of_the_times.rs+++ b/harper-core/src/linting/most_of_the_times.rs@@ -37,7 +37,7 @@ impl ExprLinter for MostOfTheTimes {"time".chars().collect(),span.get_content(src),)],- message: "Singular `time` is usually the correct form in this context.".to_string(),+ message: "Singular `time` is usually the correct form in this context.".to_owned(),priority: 32,})}diff --git a/harper-core/src/linting/naked_eye.rs b/harper-core/src/linting/naked_eye.rsindex 83eb13298..0821bbcd7 100644--- a/harper-core/src/linting/naked_eye.rs+++ b/harper-core/src/linting/naked_eye.rs@@ -82,7 +82,7 @@ impl ExprLinter for NakedEye {span: prep,lint_kind: LintKind::Miscellaneous,suggestions,- message: "This idiom usually requires a different preposition.".to_string(),+ message: "This idiom usually requires a different preposition.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/no_longer.rs b/harper-core/src/linting/no_longer.rsindex 25d70b9f2..fd78d7dcb 100644--- a/harper-core/src/linting/no_longer.rs+++ b/harper-core/src/linting/no_longer.rs@@ -53,7 +53,7 @@ impl ExprLinter for NoLonger {"no",toks[0].get_ch(src),)],- message: "The correct expression is `no longer`.".to_string(),+ message: "The correct expression is `no longer`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/nor_modal_pronoun.rs b/harper-core/src/linting/nor_modal_pronoun.rsindex 3b05c6a82..273c7fd25 100644--- a/harper-core/src/linting/nor_modal_pronoun.rs+++ b/harper-core/src/linting/nor_modal_pronoun.rs@@ -89,7 +89,7 @@ impl ExprLinter for NorModalPronoun {span: pron_modal_span,lint_kind: LintKind::Grammar,suggestions: vec![suggestion],- message: "After `nor`, the modal verb should come before the pronoun.".to_string(),+ message: "After `nor`, the modal verb should come before the pronoun.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/not_only_inversion.rs b/harper-core/src/linting/not_only_inversion.rsindex 12ceb7d48..a7f144045 100644--- a/harper-core/src/linting/not_only_inversion.rs+++ b/harper-core/src/linting/not_only_inversion.rs@@ -48,7 +48,7 @@ impl ExprLinter for NotOnlyInversion {Some(Lint {span: pronbetoks.span()?,lint_kind: LintKind::Grammar,- message: "After `not only` the subject and verb should be inverted.".to_string(),+ message: "After `not only` the subject and verb should be inverted.".to_owned(),suggestions: vec![Suggestion::replace_with_match_case(inverted,pronbetoks.span()?.get_content(src),diff --git a/harper-core/src/linting/number_suffix_capitalization.rs b/harper-core/src/linting/number_suffix_capitalization.rsindex c1cc3865c..f4d823c43 100644--- a/harper-core/src/linting/number_suffix_capitalization.rs+++ b/harper-core/src/linting/number_suffix_capitalization.rs@@ -24,7 +24,7 @@ impl Linter for NumberSuffixCapitalization {output.push(Lint {span: suffix_span,lint_kind: LintKind::Capitalization,- message: "This suffix should be lowercase".to_string(),+ message: "This suffix should be lowercase".to_owned(),suggestions: vec![Suggestion::ReplaceWith(chars.iter().map(|c| c.to_ascii_lowercase()).collect(),)],diff --git a/harper-core/src/linting/obsess_preposition.rs b/harper-core/src/linting/obsess_preposition.rsindex 7090ca65e..b180d5937 100644--- a/harper-core/src/linting/obsess_preposition.rs+++ b/harper-core/src/linting/obsess_preposition.rs@@ -86,7 +86,7 @@ impl ExprLinter for ObsessPreposition {let message = if ok_prep_vec.len() == 1 {format!("Use 'over' instead of '{}'.", String::from_iter(prep_chars))} else {- "For `excessively preoccupied with` use `obsessed with`. For `paid close attention to details` use `obsessed over`".to_string()+ "For `excessively preoccupied with` use `obsessed with`. For `paid close attention to details` use `obsessed over`".to_owned()};Some(Lint {diff --git a/harper-core/src/linting/of_course.rs b/harper-core/src/linting/of_course.rsindex c218cd9d0..36a3f6e74 100644--- a/harper-core/src/linting/of_course.rs+++ b/harper-core/src/linting/of_course.rs@@ -71,7 +71,7 @@ impl ExprLinter for OfCourse {"of course",phrase_span.get_content(source),)],- message: "Did you mean `of course`?".to_string(),+ message: "Did you mean `of course`?".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/one_of_the_singular.rs b/harper-core/src/linting/one_of_the_singular.rsindex ba36892da..206494354 100644--- a/harper-core/src/linting/one_of_the_singular.rs+++ b/harper-core/src/linting/one_of_the_singular.rs@@ -134,7 +134,7 @@ impl<D: Dictionary + 'static> ExprLinter for OneOfTheSingular<D> {span: nounspan,lint_kind: LintKind::Usage,suggestions,- message: "The construction `one of the ...` should use a plural noun.".to_string(),+ message: "The construction `one of the ...` should use a plural noun.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/plural_decades/four_digits.rs b/harper-core/src/linting/plural_decades/four_digits.rsindex df8f08974..0d137966f 100644--- a/harper-core/src/linting/plural_decades/four_digits.rs+++ b/harper-core/src/linting/plural_decades/four_digits.rs@@ -82,7 +82,7 @@ pub fn match_to_lint_four_digits(Some(Lint {span: toks.span()?,lint_kind: LintKind::Usage,- message: "Plural decades do not use an apostrophe before the `s`".to_string(),+ message: "Plural decades do not use an apostrophe before the `s`".to_owned(),suggestions: vec![Suggestion::ReplaceWith([decade, suffix].concat())],..Default::default()})diff --git a/harper-core/src/linting/plural_decades/two_digits.rs b/harper-core/src/linting/plural_decades/two_digits.rsindex 130f8e215..c9d5f3c61 100644--- a/harper-core/src/linting/plural_decades/two_digits.rs+++ b/harper-core/src/linting/plural_decades/two_digits.rs@@ -145,7 +145,7 @@ pub fn match_to_lint_two_digits(span: toks.span()?,lint_kind: LintKind::Usage,suggestions,- message: "To refer to a decade the apostrophe must be before the decade. To refer to an age range, use no apostrophe.".to_string(),+ message: "To refer to a decade the apostrophe must be before the decade. To refer to an age range, use no apostrophe.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/progressive_needs_be.rs b/harper-core/src/linting/progressive_needs_be.rsindex de7ad720b..414014728 100644--- a/harper-core/src/linting/progressive_needs_be.rs+++ b/harper-core/src/linting/progressive_needs_be.rs@@ -80,7 +80,7 @@ impl ExprLinter for ProgressiveNeedsBe {),Suggestion::InsertAfter(" been".chars().collect()),],- message: "Use present progressive (`…'re/…'m …`) or present perfect progressive (`… have been …`/`…'ve been …`) instead of `… have …ing` or `…'ve …ing`.".to_string(),+ message: "Use present progressive (`…'re/…'m …`) or present perfect progressive (`… have been …`/`…'ve been …`) instead of `… have …ing` or `…'ve …ing`.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/pronoun_contraction/should_contract.rs b/harper-core/src/linting/pronoun_contraction/should_contract.rsindex 0ff4a92da..42b0261e4 100644--- a/harper-core/src/linting/pronoun_contraction/should_contract.rs+++ b/harper-core/src/linting/pronoun_contraction/should_contract.rs@@ -91,7 +91,7 @@ impl ExprLinter for ShouldContract {.into_iter().map(|v| Suggestion::replace_with_match_case(v, span.get_content(source))).collect(),- message: "Use the contraction or separate the words instead.".to_string(),+ message: "Use the contraction or separate the words instead.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/pronoun_knew.rs b/harper-core/src/linting/pronoun_knew.rsindex 6ddc67cfb..96063379b 100644--- a/harper-core/src/linting/pronoun_knew.rs+++ b/harper-core/src/linting/pronoun_knew.rs@@ -76,7 +76,7 @@ impl ExprLinter for PronounKnew {"knew".chars().collect(),typo_text,)],- message: "Did you mean “knew” (the past tense of “know”)?".to_string(),+ message: "Did you mean “knew” (the past tense of “know”)?".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/quite_quiet.rs b/harper-core/src/linting/quite_quiet.rsindex 6306d273c..5ae33ff31 100644--- a/harper-core/src/linting/quite_quiet.rs+++ b/harper-core/src/linting/quite_quiet.rs@@ -82,7 +82,7 @@ impl ExprLinter for QuiteQuiet {"quiet".chars().collect(),quite_span.get_content(src),)],- message: "‘Quite’ might be a typo here. It means ‘rather’ but you might be trying to say ‘quiet’ (not noisy).".to_string(),+ message: "‘Quite’ might be a typo here. It means ‘rather’ but you might be trying to say ‘quiet’ (not noisy).".to_owned(),priority: 63,});} else if text.starts_with("quiet") {@@ -95,7 +95,7 @@ impl ExprLinter for QuiteQuiet {"quite".chars().collect(),quiet_span.get_content(src),)],- message: "‘Quiet’ might be a typo here. It means ‘not noisy’ but you might be trying to say ‘quite’ (rather).".to_string(),+ message: "‘Quiet’ might be a typo here. It means ‘not noisy’ but you might be trying to say ‘quite’ (rather).".to_owned(),priority: 63,});} else if text.ends_with("quiet") {@@ -108,7 +108,7 @@ impl ExprLinter for QuiteQuiet {"quite".chars().collect(),quiet_span.get_content(src),)],- message: "‘Quiet’ might be a typo here. It means ‘not noisy’ but you might be trying to say ‘quite’ (rather).".to_string(),+ message: "‘Quiet’ might be a typo here. It means ‘not noisy’ but you might be trying to say ‘quite’ (rather).".to_owned(),priority: 63,});}diff --git a/harper-core/src/linting/reason_for_doing.rs b/harper-core/src/linting/reason_for_doing.rsindex 32ae331e0..68b0fba88 100644--- a/harper-core/src/linting/reason_for_doing.rs+++ b/harper-core/src/linting/reason_for_doing.rs@@ -66,7 +66,7 @@ impl ExprLinter for ReasonForDoing {"for",ofspan.get_content(src),)],- message: "Use 'for' instead of 'of' with 'reason' and progressive verbs.".to_string(),+ message: "Use 'for' instead of 'of' with 'reason' and progressive verbs.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/redundant_acronyms.rs b/harper-core/src/linting/redundant_acronyms.rsindex 77059986e..dfdac6608 100644--- a/harper-core/src/linting/redundant_acronyms.rs+++ b/harper-core/src/linting/redundant_acronyms.rs@@ -122,7 +122,7 @@ impl ExprLinter for RedundantAcronyms {span: toks.span()?,lint_kind: LintKind::Redundancy,suggestions,- message: "The acronym's last letter already stands for the last word. Use just the acronym or the full phrase.".to_string(),+ message: "The acronym's last letter already stands for the last word. Use just the acronym or the full phrase.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/repeated_words.rs b/harper-core/src/linting/repeated_words.rsindex 28025bc26..167bf41fc 100644--- a/harper-core/src/linting/repeated_words.rs+++ b/harper-core/src/linting/repeated_words.rs@@ -76,7 +76,7 @@ impl Linter for RepeatedWords {suggestions: vec![Suggestion::ReplaceWith(document.get_span_content(&tok_a.span).to_vec(),)],- message: "Did you mean to repeat this word?".to_string(),+ message: "Did you mean to repeat this word?".to_owned(),priority: 128, // Lower priority than `TheTheToThatThe`})}diff --git a/harper-core/src/linting/rise_the_ranks.rs b/harper-core/src/linting/rise_the_ranks.rsindex 87efe732c..8416fda0d 100644--- a/harper-core/src/linting/rise_the_ranks.rs+++ b/harper-core/src/linting/rise_the_ranks.rs@@ -61,7 +61,7 @@ impl ExprLinter for RiseTheRanks {Suggestion::InsertAfter(vec![' ', 't', 'h', 'r', 'o', 'u', 'g', 'h']),Suggestion::InsertAfter(vec![' ', 'f', 'r', 'o', 'm']),],- message: "Use either the modern standard 'rise through the ranks' or the traditional 'rise from the ranks'. 'Rise the ranks' is nonstandard.".to_string(),+ message: "Use either the modern standard 'rise through the ranks' or the traditional 'rise from the ranks'. 'Rise the ranks' is nonstandard.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/safe_to_save.rs b/harper-core/src/linting/safe_to_save.rsindex a5cda74a3..5890b5814 100644--- a/harper-core/src/linting/safe_to_save.rs+++ b/harper-core/src/linting/safe_to_save.rs@@ -55,7 +55,7 @@ impl ExprLinter for SafeToSave {span: safe_tok.span,lint_kind: LintKind::WordChoice,suggestions: vec![Suggestion::ReplaceWith("save".chars().collect())],- message: "The word `safe` is an adjective. Did you mean the verb `save`?".to_string(),+ message: "The word `safe` is an adjective. Did you mean the verb `save`?".to_owned(),priority: 57,})}diff --git a/harper-core/src/linting/shoot_oneself_in_the_foot.rs b/harper-core/src/linting/shoot_oneself_in_the_foot.rsindex 909258889..c65b863a0 100644--- a/harper-core/src/linting/shoot_oneself_in_the_foot.rs+++ b/harper-core/src/linting/shoot_oneself_in_the_foot.rs@@ -75,7 +75,7 @@ impl ExprLinter for ShootOneselfInTheFoot {span: in_the_foot,lint_kind: LintKind::Miscellaneous,suggestions,- message: "The standard idiom is 'shoot oneself in the foot'.".to_string(),+ message: "The standard idiom is 'shoot oneself in the foot'.".to_owned(),priority: 50,})}diff --git a/harper-core/src/linting/since_duration.rs b/harper-core/src/linting/since_duration.rsindex e92b9f370..6fc846584 100644--- a/harper-core/src/linting/since_duration.rs+++ b/harper-core/src/linting/since_duration.rs@@ -76,7 +76,7 @@ impl ExprLinter for SinceDuration {span: since_duration_span,lint_kind: LintKind::Miscellaneous,suggestions: vec![for_suggestion, ago_suggestion],- message: "For a duration, use 'for' instead of 'since'. Or for a point in time, add 'ago' at the end.".to_string(),+ message: "For a duration, use 'for' instead of 'since'. Or for a point in time, add 'ago' at the end.".to_owned(),priority: 50,})}diff --git a/harper-core/src/linting/spaces.rs b/harper-core/src/linting/spaces.rsindex d51954d24..a8586a00e 100644--- a/harper-core/src/linting/spaces.rs+++ b/harper-core/src/linting/spaces.rs@@ -57,7 +57,7 @@ impl Linter for Spaces {span: space.span,lint_kind: LintKind::Formatting,suggestions: vec![Suggestion::Remove],- message: "Unnecessary space at the end of the sentence.".to_string(),+ message: "Unnecessary space at the end of the sentence.".to_owned(),priority: 63,})}diff --git a/harper-core/src/linting/spelled_numbers.rs b/harper-core/src/linting/spelled_numbers.rsindex 4a6b1a3d1..2212938f7 100644--- a/harper-core/src/linting/spelled_numbers.rs+++ b/harper-core/src/linting/spelled_numbers.rs@@ -28,7 +28,7 @@ impl Linter for SpelledNumbers {suggestions: vec![Suggestion::ReplaceWith(spell_out_number(value as u64).unwrap().chars().collect(),)],- message: "Try to spell out numbers less than ten.".to_string(),+ message: "Try to spell out numbers less than ten.".to_owned(),priority: 63,})}@@ -52,51 +52,59 @@ fn spell_out_number(num: u64) -> Option<String> {return None;}- Some(match num {- 0 => "zero".to_string(),- 1 => "one".to_string(),- 2 => "two".to_string(),- 3 => "three".to_string(),- 4 => "four".to_string(),- 5 => "five".to_string(),- 6 => "six".to_string(),- 7 => "seven".to_string(),- 8 => "eight".to_string(),- 9 => "nine".to_string(),- 10 => "ten".to_string(),- 11 => "eleven".to_string(),- 12 => "twelve".to_string(),- 13 => "thirteen".to_string(),- 14 => "fourteen".to_string(),- 15 => "fifteen".to_string(),- 16 => "sixteen".to_string(),- 17 => "seventeen".to_string(),- 18 => "eighteen".to_string(),- 19 => "nineteen".to_string(),- 20 => "twenty".to_string(),- 30 => "thirty".to_string(),- 40 => "forty".to_string(),- 50 => "fifty".to_string(),- 60 => "sixty".to_string(),- 70 => "seventy".to_string(),- 80 => "eighty".to_string(),- 90 => "ninety".to_string(),- hundred if hundred % 100 == 0 => {- format!("{} hundred", spell_out_number(hundred / 100).unwrap())- }- _ => {+ match num {+ hundred if hundred % 100 == 0 && hundred > 0 => Some(format!(+ "{} hundred",+ spell_out_number(hundred / 100).unwrap()+ )),+ // Match numbers above 100 (like 110), OR two-digit numbers that don't end in 0 (like 21)+ num if num > 100 || (num > 20 && num % 10 != 0) => {let n = 10u64.pow((num as f32).log10() as u32);let parent = (num / n) * n; // truncatelet child = num % n;- format!(+ Some(format!("{}{}{}",spell_out_number(parent).unwrap(),if num <= 99 { '-' } else { ' ' },spell_out_number(child).unwrap()- )+ ))}- })+ base_num => Some(+ match base_num {+ 0 => "zero",+ 1 => "one",+ 2 => "two",+ 3 => "three",+ 4 => "four",+ 5 => "five",+ 6 => "six",+ 7 => "seven",+ 8 => "eight",+ 9 => "nine",+ 10 => "ten",+ 11 => "eleven",+ 12 => "twelve",+ 13 => "thirteen",+ 14 => "fourteen",+ 15 => "fifteen",+ 16 => "sixteen",+ 17 => "seventeen",+ 18 => "eighteen",+ 19 => "nineteen",+ 20 => "twenty",+ 30 => "thirty",+ 40 => "forty",+ 50 => "fifty",+ 60 => "sixty",+ 70 => "seventy",+ 80 => "eighty",+ 90 => "ninety",+ _ => return None,+ }+ .to_owned(),+ ),+ }}#[cfg(test)]@@ -107,19 +115,19 @@ mod tests {#[test]fn produces_zero() {- assert_eq!(spell_out_number(0), Some("zero".to_string()))+ assert_eq!(spell_out_number(0), Some("zero".to_owned()))}#[test]fn produces_eighty_two() {- assert_eq!(spell_out_number(82), Some("eighty-two".to_string()))+ assert_eq!(spell_out_number(82), Some("eighty-two".to_owned()))}#[test]fn produces_nine_hundred_ninety_nine() {assert_eq!(spell_out_number(999),- Some("nine hundred ninety-nine".to_string())+ Some("nine hundred ninety-nine".to_owned()))}diff --git a/harper-core/src/linting/take_a_look_to.rs b/harper-core/src/linting/take_a_look_to.rsindex 60561f845..9c406ddde 100644--- a/harper-core/src/linting/take_a_look_to.rs+++ b/harper-core/src/linting/take_a_look_to.rs@@ -71,7 +71,7 @@ impl ExprLinter for TakeALookTo {vec!['a', 't'],to_span.get_content(src),)],- message: "This phrase uses `to` rather than `at`".to_string(),+ message: "This phrase uses `to` rather than `at`".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/take_serious.rs b/harper-core/src/linting/take_serious.rsindex 5160edc47..76fb576c6 100644--- a/harper-core/src/linting/take_serious.rs+++ b/harper-core/src/linting/take_serious.rs@@ -57,7 +57,7 @@ impl ExprLinter for TakeSerious {span: whole_phrase_span,lint_kind: LintKind::WordChoice,suggestions,- message: "Take seriously".to_string(),+ message: "Take seriously".to_owned(),priority: 63,})}diff --git a/harper-core/src/linting/that_which.rs b/harper-core/src/linting/that_which.rsindex 4e657f728..91a6e1a66 100644--- a/harper-core/src/linting/that_which.rs+++ b/harper-core/src/linting/that_which.rs@@ -53,7 +53,7 @@ impl ExprLinter for ThatWhich {span: matched_tokens.span()?,lint_kind: LintKind::Repetition,suggestions: vec![Suggestion::ReplaceWith(suggestion)],- message: "“that that” sometimes means “that which”, which is clearer.".to_string(),+ message: "“that that” sometimes means “that which”, which is clearer.".to_owned(),priority: 126,})}diff --git a/harper-core/src/linting/the_point_for.rs b/harper-core/src/linting/the_point_for.rsindex 8c8e9fc00..4464d8aa7 100644--- a/harper-core/src/linting/the_point_for.rs+++ b/harper-core/src/linting/the_point_for.rs@@ -60,7 +60,7 @@ impl ExprLinter for ThePointFor {"of",forspan.get_content(src),)],- message: "Did you mean `the point of`?".to_string(),+ message: "Did you mean `the point of`?".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/there_is_agreement.rs b/harper-core/src/linting/there_is_agreement.rsindex 91307cd61..57e7ed369 100644--- a/harper-core/src/linting/there_is_agreement.rs+++ b/harper-core/src/linting/there_is_agreement.rs@@ -312,7 +312,7 @@ fn handle_statement<D: Dictionary>(Some(Lint {span: toks[2..=4].span()?,- message: "There is disagreement in number between the verb and the noun.".to_string(),+ message: "There is disagreement in number between the verb and the noun.".to_owned(),suggestions: [vec![be_suggestion], noun_suggestions].concat(),lint_kind: LintKind::Agreement,..Default::default()@@ -382,7 +382,7 @@ fn handle_theres<D: Dictionary>(span: toks[0..=2].span()?,lint_kind: LintKind::Agreement,suggestions: [vec![there_be_suggestion], noun_suggestions].concat(),- message: "`There's` means `there is`, which requires a singular noun.".to_string(),+ message: "`There's` means `there is`, which requires a singular noun.".to_owned(),..Default::default()})}@@ -479,7 +479,7 @@ fn handle_question<D: Dictionary>(span: toks[0..=4].span()?,lint_kind: LintKind::Agreement,suggestions: [vec![be_suggestion], noun_suggestions].concat(),- message: "There is disagreement in number between the verb and the noun.".to_string(),+ message: "There is disagreement in number between the verb and the noun.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/theses_these.rs b/harper-core/src/linting/theses_these.rsindex 50b7ec20d..da3f1ab6d 100644--- a/harper-core/src/linting/theses_these.rs+++ b/harper-core/src/linting/theses_these.rs@@ -38,7 +38,7 @@ impl ExprLinter for ThesesThese {span: theses_token.span,lint_kind: LintKind::Spelling,suggestions,- message: "Did you mean `these`?".to_string(),+ message: "Did you mean `these`?".to_owned(),priority: 1,})}diff --git a/harper-core/src/linting/though_thought.rs b/harper-core/src/linting/though_thought.rsindex 42f1a0548..b395a40af 100644--- a/harper-core/src/linting/though_thought.rs+++ b/harper-core/src/linting/though_thought.rs@@ -46,7 +46,7 @@ impl ExprLinter for ThoughThought {"thought",tok.get_ch(src),)],- message: "Is this a typo for `thought`?".to_string(),+ message: "Is this a typo for `thought`?".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/to_two_too/to_too_adjective_end.rs b/harper-core/src/linting/to_two_too/to_too_adjective_end.rsindex b25c73c92..38601c46b 100644--- a/harper-core/src/linting/to_two_too/to_too_adjective_end.rs+++ b/harper-core/src/linting/to_two_too/to_too_adjective_end.rs@@ -99,7 +99,7 @@ impl ExprLinter for ToTooAdjectiveEnd {"too",to_tok.get_ch(source),)],- message: "Use `too` here to mean ‘also’ or an excessive degree.".to_string(),+ message: "Use `too` here to mean ‘also’ or an excessive degree.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/to_two_too/to_too_adjective_punct.rs b/harper-core/src/linting/to_two_too/to_too_adjective_punct.rsindex b1fe905c4..9b15d5246 100644--- a/harper-core/src/linting/to_two_too/to_too_adjective_punct.rs+++ b/harper-core/src/linting/to_two_too/to_too_adjective_punct.rs@@ -74,7 +74,7 @@ impl ExprLinter for ToTooAdjectivePunct {"too",to_tok.get_ch(source),)],- message: "Use `too` here to mean ‘also’ or an excessive degree.".to_string(),+ message: "Use `too` here to mean ‘also’ or an excessive degree.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/to_two_too/to_too_adjverb_ed_punct.rs b/harper-core/src/linting/to_two_too/to_too_adjverb_ed_punct.rsindex 55ebc8d3e..3cd43c226 100644--- a/harper-core/src/linting/to_two_too/to_too_adjverb_ed_punct.rs+++ b/harper-core/src/linting/to_two_too/to_too_adjverb_ed_punct.rs@@ -51,7 +51,7 @@ impl ExprLinter for ToTooAdjVerbEdPunct {"too",to_tok.get_ch(source),)],- message: "Use `too` here to mean ‘also’ or an excessive degree.".to_string(),+ message: "Use `too` here to mean ‘also’ or an excessive degree.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/to_two_too/to_too_adverb.rs b/harper-core/src/linting/to_two_too/to_too_adverb.rsindex 66efe2dab..ed4ea117e 100644--- a/harper-core/src/linting/to_two_too/to_too_adverb.rs+++ b/harper-core/src/linting/to_two_too/to_too_adverb.rs@@ -57,7 +57,7 @@ impl ExprLinter for ToTooAdverb {"too",to_tok.get_ch(source),)],- message: "Use `too` here to mean ‘also’ or an excessive degree.".to_string(),+ message: "Use `too` here to mean ‘also’ or an excessive degree.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/to_two_too/to_too_chunk_start_comma.rs b/harper-core/src/linting/to_two_too/to_too_chunk_start_comma.rsindex 9bd6f1a3f..879268777 100644--- a/harper-core/src/linting/to_two_too/to_too_chunk_start_comma.rs+++ b/harper-core/src/linting/to_two_too/to_too_chunk_start_comma.rs@@ -44,7 +44,7 @@ impl ExprLinter for ToTooChunkStartComma {"too",to_tok.get_ch(source),)],- message: "Use `too` here to mean ‘also’ or an excessive degree.".to_string(),+ message: "Use `too` here to mean ‘also’ or an excessive degree.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/to_two_too/to_too_degree_words.rs b/harper-core/src/linting/to_two_too/to_too_degree_words.rsindex d5bec98d5..68cd48fee 100644--- a/harper-core/src/linting/to_two_too/to_too_degree_words.rs+++ b/harper-core/src/linting/to_two_too/to_too_degree_words.rs@@ -53,7 +53,7 @@ impl ExprLinter for ToTooDegreeWords {"too",to_tok.get_ch(source),)],- message: "Use `too` here to mean ‘also’ or an excessive degree.".to_string(),+ message: "Use `too` here to mean ‘also’ or an excessive degree.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/to_two_too/to_too_pronoun_end.rs b/harper-core/src/linting/to_two_too/to_too_pronoun_end.rsindex 45a23e4e2..5ae145afa 100644--- a/harper-core/src/linting/to_two_too/to_too_pronoun_end.rs+++ b/harper-core/src/linting/to_two_too/to_too_pronoun_end.rs@@ -65,7 +65,7 @@ impl ExprLinter for ToTooPronounEnd {"too",to_tok.get_ch(source),)],- message: "Use `too` here to mean ‘also’ or an excessive degree.".to_string(),+ message: "Use `too` here to mean ‘also’ or an excessive degree.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/to_two_too/too_to.rs b/harper-core/src/linting/to_two_too/too_to.rsindex 12b361dc9..86c9c2c02 100644--- a/harper-core/src/linting/to_two_too/too_to.rs+++ b/harper-core/src/linting/to_two_too/too_to.rs@@ -52,7 +52,7 @@ impl ExprLinter for TooTo {suggestions: vec![Suggestion::replace_with_match_case("to".chars().collect(), text)],- message: "Use the infinitive marker `to` here instead of the adverb `too`, which indicates excess degree.".to_string(),+ message: "Use the infinitive marker `to` here instead of the adverb `too`, which indicates excess degree.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/touristic.rs b/harper-core/src/linting/touristic.rsindex 6b99e70dd..4ecebe23c 100644--- a/harper-core/src/linting/touristic.rs+++ b/harper-core/src/linting/touristic.rs@@ -175,7 +175,7 @@ impl ExprLinter for Touristic {.into_iter().map(|s| Suggestion::replace_with_match_case_str(s, span.get_content(src))).collect(),- message: "The word `touristic` is rarely used by native speakers.".to_string(),+ message: "The word `touristic` is rarely used by native speakers.".to_owned(),priority: 31,})}diff --git a/harper-core/src/linting/try_ones_hand_at.rs b/harper-core/src/linting/try_ones_hand_at.rsindex ef8f2af11..f25827522 100644--- a/harper-core/src/linting/try_ones_hand_at.rs+++ b/harper-core/src/linting/try_ones_hand_at.rs@@ -42,7 +42,7 @@ impl ExprLinter for TryOnesHandAt {vec!['h', 'a', 'n', 'd'],hands_chars,)],- message: "This idiom uses the singular `hand`.".to_string(),+ message: "This idiom uses the singular `hand`.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/try_ones_luck.rs b/harper-core/src/linting/try_ones_luck.rsindex 71797bf83..51057a912 100644--- a/harper-core/src/linting/try_ones_luck.rs+++ b/harper-core/src/linting/try_ones_luck.rs@@ -38,7 +38,7 @@ impl ExprLinter for TryOnesLuck {Some(Lint {lint_kind: LintKind::Usage,span: ws_out_span,- message: "`Try out` is a different idiom than `try one's luck`".to_string(),+ message: "`Try out` is a different idiom than `try one's luck`".to_owned(),suggestions: vec![Suggestion::Remove],..Default::default()})diff --git a/harper-core/src/linting/unclosed_quotes.rs b/harper-core/src/linting/unclosed_quotes.rsindex 09c484455..f29fb5799 100644--- a/harper-core/src/linting/unclosed_quotes.rs+++ b/harper-core/src/linting/unclosed_quotes.rs@@ -17,7 +17,7 @@ impl Linter for UnclosedQuotes {span: token.span,lint_kind: LintKind::Formatting,suggestions: vec![],- message: "This quote has no termination.".to_string(),+ message: "This quote has no termination.".to_owned(),priority: 255,})}diff --git a/harper-core/src/linting/very_unique.rs b/harper-core/src/linting/very_unique.rsindex 874f053db..27be1119a 100644--- a/harper-core/src/linting/very_unique.rs+++ b/harper-core/src/linting/very_unique.rs@@ -54,7 +54,7 @@ impl ExprLinter for VeryUnique {span: very_unique_span,lint_kind: LintKind::WordChoice,suggestions,- message: "`Unique` is absolute, so consider using `unique` alone or a more precise adjective such as `special`, `rare`, or `unusual`.".to_string(),+ message: "`Unique` is absolute, so consider using `unique` alone or a more precise adjective such as `special`, `rare`, or `unusual`.".to_owned(),priority: 57,})}diff --git a/harper-core/src/linting/vicious_loop/mod.rs b/harper-core/src/linting/vicious_loop/mod.rsindex 111a49d75..347f456e1 100644--- a/harper-core/src/linting/vicious_loop/mod.rs+++ b/harper-core/src/linting/vicious_loop/mod.rs@@ -87,9 +87,9 @@ fn to_lint(toks: &[Token], src: &[char], pref: Prefer) -> Option<Lint> {nountok.get_ch(src),)],message: if pref == Prefer::Circle {- "This idiom originally used `circle`, not `cycle`".to_string()+ "This idiom originally used `circle`, not `cycle`".to_owned()} else {- "Though this idiom originally used `circle`, `cycle` is preferred.".to_string()+ "Though this idiom originally used `circle`, `cycle` is preferred.".to_owned()},..Default::default()});diff --git a/harper-core/src/linting/were_where.rs b/harper-core/src/linting/were_where.rsindex 7d6f7dd85..a4bc9af1b 100644--- a/harper-core/src/linting/were_where.rs+++ b/harper-core/src/linting/were_where.rs@@ -104,7 +104,7 @@ impl ExprLinter for WereWhere {"were",tok.span.get_content(src),)],- message: "It looks like this is a typo, did you mean `were`?".to_string(),+ message: "It looks like this is a typo, did you mean `were`?".to_owned(),..Default::default()})} else {@@ -115,7 +115,7 @@ impl ExprLinter for WereWhere {"where",tok.span.get_content(src),)],- message: "It looks like this is a typo, did you mean `where`?".to_string(),+ message: "It looks like this is a typo, did you mean `where`?".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/wish_could.rs b/harper-core/src/linting/wish_could.rsindex e7591d6cf..d75cf23e8 100644--- a/harper-core/src/linting/wish_could.rs+++ b/harper-core/src/linting/wish_could.rs@@ -58,7 +58,7 @@ impl ExprLinter for WishCould {"could",can_span.get_content(src),)],- message: "Use 'could' instead of 'can' after 'wish'.".to_string(),+ message: "Use 'could' instead of 'can' after 'wish'.".to_owned(),..Default::default()})}diff --git a/harper-core/src/linting/worth_to_do.rs b/harper-core/src/linting/worth_to_do.rsindex dceafd298..13724dd42 100644--- a/harper-core/src/linting/worth_to_do.rs+++ b/harper-core/src/linting/worth_to_do.rs@@ -86,7 +86,7 @@ wherespan: tolemspan,lint_kind: LintKind::Grammar,suggestions,- message: "Use the `gerund` of the verb, the form that ends in `-ing`".to_string(),+ message: "Use the `gerund` of the verb, the form that ends in `-ing`".to_owned(),..Default::default()})}