Consistently use 'Self' type in 'impl' blocks
This commit is contained in:
parent
3f4c23321f
commit
2c140d0481
3 changed files with 21 additions and 21 deletions
|
|
@ -15,19 +15,19 @@ pub enum Rank {
|
|||
}
|
||||
|
||||
impl Rank {
|
||||
const ALL: [Rank; 8] = [
|
||||
Rank::First,
|
||||
Rank::Second,
|
||||
Rank::Third,
|
||||
Rank::Fourth,
|
||||
Rank::Fifth,
|
||||
Rank::Sixth,
|
||||
Rank::Seventh,
|
||||
Rank::Eighth,
|
||||
const ALL: [Self; 8] = [
|
||||
Self::First,
|
||||
Self::Second,
|
||||
Self::Third,
|
||||
Self::Fourth,
|
||||
Self::Fifth,
|
||||
Self::Sixth,
|
||||
Self::Seventh,
|
||||
Self::Eighth,
|
||||
];
|
||||
|
||||
/// Iterate over all ranks in order.
|
||||
pub fn iter() -> impl Iterator<Item = Rank> {
|
||||
pub fn iter() -> impl Iterator<Item = Self> {
|
||||
Self::ALL.iter().cloned()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue