Add doc examples count for --show-coverage

This commit is contained in:
Guillaume Gomez 2020-08-18 13:31:23 +02:00
parent 441fd22557
commit d9d84dca8e
3 changed files with 88 additions and 26 deletions

View file

@ -200,10 +200,12 @@ fn get_index_type_name(clean_type: &clean::Type, accept_generic: bool) -> Option
match *clean_type {
clean::ResolvedPath { ref path, .. } => {
let segments = &path.segments;
let path_segment = segments.iter().last().unwrap_or_else(|| panic!(
let path_segment = segments.iter().last().unwrap_or_else(|| {
panic!(
"get_index_type_name(clean_type: {:?}, accept_generic: {:?}) had length zero path",
clean_type, accept_generic
));
)
});
Some(path_segment.name.clone())
}
clean::Generic(ref s) if accept_generic => Some(s.clone()),