mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-22 03:40:59 +00:00
angry at clippy for this
This commit is contained in:
parent
ea334aa9ce
commit
3887886785
1 changed files with 3 additions and 21 deletions
|
@ -400,13 +400,7 @@ impl<'a, T> Iterator for Iter<'a, T> {
|
||||||
|
|
||||||
fn count(self) -> usize {
|
fn count(self) -> usize {
|
||||||
match self.0 {
|
match self.0 {
|
||||||
Either::Left(opt) => {
|
Either::Left(opt) => opt.map_or(0, |_| 1),
|
||||||
if opt.is_some() {
|
|
||||||
1
|
|
||||||
} else {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Either::Right(iter) => iter.count(),
|
Either::Right(iter) => iter.count(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -466,13 +460,7 @@ impl<'a, T> Iterator for IterMut<'a, T> {
|
||||||
|
|
||||||
fn count(self) -> usize {
|
fn count(self) -> usize {
|
||||||
match self.0 {
|
match self.0 {
|
||||||
Either::Left(opt) => {
|
Either::Left(opt) => opt.map_or(0, |_| 1),
|
||||||
if opt.is_some() {
|
|
||||||
1
|
|
||||||
} else {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Either::Right(iter) => iter.count(),
|
Either::Right(iter) => iter.count(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -532,13 +520,7 @@ impl<T> Iterator for IntoIter<T> {
|
||||||
|
|
||||||
fn count(self) -> usize {
|
fn count(self) -> usize {
|
||||||
match self.0 {
|
match self.0 {
|
||||||
Either::Left(opt) => {
|
Either::Left(opt) => opt.map_or(0, |_| 1),
|
||||||
if opt.is_some() {
|
|
||||||
1
|
|
||||||
} else {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Either::Right(iter) => iter.count(),
|
Either::Right(iter) => iter.count(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue