From a5c55115cf585880bae6cc9dcc62e7c55a2a8f72 Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Fri, 28 Jul 2023 00:25:43 -0700 Subject: [PATCH] Add nursery lint --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index d237312..2eca1ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -#![warn(clippy::pedantic, clippy::cargo)] +#![warn(clippy::pedantic, clippy::cargo, clippy::nursery)] use std::collections::{BTreeMap, HashMap, HashSet}; use std::fmt::{Debug, Display}; @@ -83,8 +83,8 @@ enum OutputFormat { impl Display for OutputFormat { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { - OutputFormat::Table => Display::fmt("table", f), - OutputFormat::Json => Display::fmt("json", f), + Self::Table => Display::fmt("table", f), + Self::Json => Display::fmt("json", f), } } } @@ -100,9 +100,9 @@ enum Color { impl Display for Color { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { - Color::Auto => Display::fmt("auto", f), - Color::Never => Display::fmt("never", f), - Color::Always => Display::fmt("always", f), + Self::Auto => Display::fmt("auto", f), + Self::Never => Display::fmt("never", f), + Self::Always => Display::fmt("always", f), } } }