From 683039e08f8f445cad850a48d46a3e7d93487b24 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 5 May 2022 08:06:04 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20duplicate=20methods=20on=20item?= =?UTF-8?q?s=20which=20implement=20Deref?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/sql/group.rs | 9 --------- lib/src/sql/idiom.rs | 9 --------- lib/src/sql/order.rs | 9 --------- lib/src/sql/split.rs | 9 --------- lib/src/sql/value/value.rs | 9 --------- 5 files changed, 45 deletions(-) diff --git a/lib/src/sql/group.rs b/lib/src/sql/group.rs index 79210ca7..464fc634 100644 --- a/lib/src/sql/group.rs +++ b/lib/src/sql/group.rs @@ -13,15 +13,6 @@ use std::ops::Deref; #[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)] pub struct Groups(pub Vec); -impl Groups { - pub fn len(&self) -> usize { - self.0.len() - } - pub fn is_empty(&self) -> bool { - self.0.is_empty() - } -} - impl Deref for Groups { type Target = Vec; fn deref(&self) -> &Self::Target { diff --git a/lib/src/sql/idiom.rs b/lib/src/sql/idiom.rs index 466c603e..39bd3510 100644 --- a/lib/src/sql/idiom.rs +++ b/lib/src/sql/idiom.rs @@ -17,15 +17,6 @@ use std::str; #[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)] pub struct Idioms(pub Vec); -impl Idioms { - pub fn len(&self) -> usize { - self.0.len() - } - pub fn is_empty(&self) -> bool { - self.0.is_empty() - } -} - impl Deref for Idioms { type Target = Vec; fn deref(&self) -> &Self::Target { diff --git a/lib/src/sql/order.rs b/lib/src/sql/order.rs index daed8ffb..9306d10b 100644 --- a/lib/src/sql/order.rs +++ b/lib/src/sql/order.rs @@ -14,15 +14,6 @@ use std::ops::Deref; #[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)] pub struct Orders(pub Vec); -impl Orders { - pub fn len(&self) -> usize { - self.0.len() - } - pub fn is_empty(&self) -> bool { - self.0.is_empty() - } -} - impl Deref for Orders { type Target = Vec; fn deref(&self) -> &Self::Target { diff --git a/lib/src/sql/split.rs b/lib/src/sql/split.rs index 5dbf185a..28514483 100644 --- a/lib/src/sql/split.rs +++ b/lib/src/sql/split.rs @@ -13,15 +13,6 @@ use std::ops::Deref; #[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)] pub struct Splits(pub Vec); -impl Splits { - pub fn len(&self) -> usize { - self.0.len() - } - pub fn is_empty(&self) -> bool { - self.0.is_empty() - } -} - impl Deref for Splits { type Target = Vec; fn deref(&self) -> &Self::Target { diff --git a/lib/src/sql/value/value.rs b/lib/src/sql/value/value.rs index aad643ec..264d835a 100644 --- a/lib/src/sql/value/value.rs +++ b/lib/src/sql/value/value.rs @@ -52,15 +52,6 @@ static MATCHER: Lazy = Lazy::new(|| SkimMatcherV2::default().igno #[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)] pub struct Values(pub Vec); -impl Values { - pub fn len(&self) -> usize { - self.0.len() - } - pub fn is_empty(&self) -> bool { - self.0.is_empty() - } -} - impl Deref for Values { type Target = Vec; fn deref(&self) -> &Self::Target {