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