Don’t duplicate methods on items which implement Deref
This commit is contained in:
parent
4824f1b627
commit
683039e08f
5 changed files with 0 additions and 45 deletions
|
@ -13,15 +13,6 @@ use std::ops::Deref;
|
||||||
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)]
|
||||||
pub struct Groups(pub Vec<Group>);
|
pub struct Groups(pub Vec<Group>);
|
||||||
|
|
||||||
impl Groups {
|
|
||||||
pub fn len(&self) -> usize {
|
|
||||||
self.0.len()
|
|
||||||
}
|
|
||||||
pub fn is_empty(&self) -> bool {
|
|
||||||
self.0.is_empty()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Deref for Groups {
|
impl Deref for Groups {
|
||||||
type Target = Vec<Group>;
|
type Target = Vec<Group>;
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
|
|
|
@ -17,15 +17,6 @@ use std::str;
|
||||||
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)]
|
||||||
pub struct Idioms(pub Vec<Idiom>);
|
pub struct Idioms(pub Vec<Idiom>);
|
||||||
|
|
||||||
impl Idioms {
|
|
||||||
pub fn len(&self) -> usize {
|
|
||||||
self.0.len()
|
|
||||||
}
|
|
||||||
pub fn is_empty(&self) -> bool {
|
|
||||||
self.0.is_empty()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Deref for Idioms {
|
impl Deref for Idioms {
|
||||||
type Target = Vec<Idiom>;
|
type Target = Vec<Idiom>;
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
|
|
|
@ -14,15 +14,6 @@ use std::ops::Deref;
|
||||||
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)]
|
||||||
pub struct Orders(pub Vec<Order>);
|
pub struct Orders(pub Vec<Order>);
|
||||||
|
|
||||||
impl Orders {
|
|
||||||
pub fn len(&self) -> usize {
|
|
||||||
self.0.len()
|
|
||||||
}
|
|
||||||
pub fn is_empty(&self) -> bool {
|
|
||||||
self.0.is_empty()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Deref for Orders {
|
impl Deref for Orders {
|
||||||
type Target = Vec<Order>;
|
type Target = Vec<Order>;
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
|
|
|
@ -13,15 +13,6 @@ use std::ops::Deref;
|
||||||
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)]
|
||||||
pub struct Splits(pub Vec<Split>);
|
pub struct Splits(pub Vec<Split>);
|
||||||
|
|
||||||
impl Splits {
|
|
||||||
pub fn len(&self) -> usize {
|
|
||||||
self.0.len()
|
|
||||||
}
|
|
||||||
pub fn is_empty(&self) -> bool {
|
|
||||||
self.0.is_empty()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Deref for Splits {
|
impl Deref for Splits {
|
||||||
type Target = Vec<Split>;
|
type Target = Vec<Split>;
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
|
|
|
@ -52,15 +52,6 @@ static MATCHER: Lazy<SkimMatcherV2> = Lazy::new(|| SkimMatcherV2::default().igno
|
||||||
#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct Values(pub Vec<Value>);
|
pub struct Values(pub Vec<Value>);
|
||||||
|
|
||||||
impl Values {
|
|
||||||
pub fn len(&self) -> usize {
|
|
||||||
self.0.len()
|
|
||||||
}
|
|
||||||
pub fn is_empty(&self) -> bool {
|
|
||||||
self.0.is_empty()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Deref for Values {
|
impl Deref for Values {
|
||||||
type Target = Vec<Value>;
|
type Target = Vec<Value>;
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
|
|
Loading…
Reference in a new issue