allow len without is_empty
This commit is contained in:
@@ -132,6 +132,7 @@ pub struct CatchStrains {
|
|||||||
impl CatchStrains {
|
impl CatchStrains {
|
||||||
/// Returns the number of strain peaks per skill.
|
/// Returns the number of strain peaks per skill.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::len_without_is_empty)]
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
self.movement.len()
|
self.movement.len()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,6 +332,7 @@ impl Strains {
|
|||||||
|
|
||||||
/// Returns the number of strain peaks per skill.
|
/// Returns the number of strain peaks per skill.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::len_without_is_empty)]
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
match self {
|
match self {
|
||||||
Strains::Catch(strains) => strains.len(),
|
Strains::Catch(strains) => strains.len(),
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ pub struct ManiaStrains {
|
|||||||
impl ManiaStrains {
|
impl ManiaStrains {
|
||||||
/// Returns the number of strain peaks per skill.
|
/// Returns the number of strain peaks per skill.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::len_without_is_empty)]
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
self.strains.len()
|
self.strains.len()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,6 +219,7 @@ pub struct OsuStrains {
|
|||||||
impl OsuStrains {
|
impl OsuStrains {
|
||||||
/// Returns the number of strain peaks per skill.
|
/// Returns the number of strain peaks per skill.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::len_without_is_empty)]
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
self.aim.len()
|
self.aim.len()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ pub struct TaikoStrains {
|
|||||||
impl TaikoStrains {
|
impl TaikoStrains {
|
||||||
/// Returns the number of strain peaks per skill.
|
/// Returns the number of strain peaks per skill.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::len_without_is_empty)]
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
self.color.len()
|
self.color.len()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user