From 79614a9d6df02c661071f55e81bfc81da5055480 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 31 Oct 2021 21:33:45 +0530 Subject: fix the spelling of explanation --- bin/src/config.rs | 2 +- bin/src/explain.rs | 2 +- lib/src/lib.rs | 8 ++++---- macros/src/explain.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/src/config.rs b/bin/src/config.rs index 7188c45..1649017 100644 --- a/bin/src/config.rs +++ b/bin/src/config.rs @@ -26,7 +26,7 @@ pub enum SubCommand { Fix(Fix), /// Fix exactly one issue at provided position Single(Single), - /// Print detailed explaination for a lint warning + /// Print detailed explanation for a lint warning Explain(Explain), } diff --git a/bin/src/explain.rs b/bin/src/explain.rs index c663427..6aefa7e 100644 --- a/bin/src/explain.rs +++ b/bin/src/explain.rs @@ -9,7 +9,7 @@ pub fn explain(code: u32) -> Result<&'static str, ExplainErr> { .values() .flatten() .find(|l| l.code() == code) - .map(|l| l.explaination()) + .map(|l| l.explanation()) .ok_or(ExplainErr::LintNotFound(code)), } } diff --git a/lib/src/lib.rs b/lib/src/lib.rs index e6bfa6c..5347666 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -234,15 +234,15 @@ pub trait Metadata { fn match_kind(&self) -> Vec; } -/// Contains offline explaination for each lint +/// Contains offline explanation for each lint /// The `lint` macro scans nearby doc comments for -/// explainations and derives this trait. +/// explanations and derives this trait. /// /// FIXME: the lint macro does way too much, maybe /// split it into smaller macros. pub trait Explain { - fn explaination(&self) -> &'static str { - "no explaination found" + fn explanation(&self) -> &'static str { + "no explanation found" } } diff --git a/macros/src/explain.rs b/macros/src/explain.rs index 9bc3c29..41dc5d4 100644 --- a/macros/src/explain.rs +++ b/macros/src/explain.rs @@ -20,7 +20,7 @@ pub fn generate_explain_impl(struct_item: &ItemStruct) -> TokenStream2 { .join("\n"); quote! { impl crate::Explain for #struct_name { - fn explaination(&self) -> &'static str { + fn explanation(&self) -> &'static str { #explain } } -- cgit v1.2.3