Fix stability_summary fallout
This commit is contained in:
parent
de938b6ca1
commit
064e84e30b
1 changed files with 11 additions and 7 deletions
|
@ -120,15 +120,19 @@ fn summarize_methods(item: &Item) -> Counts {
|
||||||
match cache_key.get().unwrap().impls.get(&item.def_id) {
|
match cache_key.get().unwrap().impls.get(&item.def_id) {
|
||||||
Some(v) => {
|
Some(v) => {
|
||||||
v.iter().map(|i| {
|
v.iter().map(|i| {
|
||||||
let mut count = count_stability(i.stability.as_ref());
|
let count = count_stability(i.stability.as_ref());
|
||||||
if i.impl_.trait_.is_none() {
|
if i.impl_.trait_.is_none() {
|
||||||
count = count +
|
count + i.impl_.items.iter()
|
||||||
i.impl_.items.iter().map(|ti| summarize_item(ti).0).sum();
|
.map(|ti| summarize_item(ti).0)
|
||||||
|
.fold(Counts::zero(), |acc, c| acc + c)
|
||||||
|
} else {
|
||||||
|
count
|
||||||
}
|
}
|
||||||
count
|
}).fold(Counts::zero(), |acc, c| acc + c)
|
||||||
}).sum()
|
},
|
||||||
}
|
None => {
|
||||||
None => Zero::zero()
|
Counts::zero()
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue