Make fold_item_recur non-nullable

This gets rid of a bunch of `unwrap()`s and makes it a little more clear
what's going on.

Originally I wanted to make `fold_item` non-nullable too, which would
have been a lot nicer to work with, but unfortunately `stripper` does
actually return `None` in some places. I might make a follow-up moving
stripper to be special and not a pass so that passes can be
non-nullable.
This commit is contained in:
Joshua Nelson
2020-11-22 12:57:55 -05:00
parent 828461b4b2
commit ab1e634295
15 changed files with 70 additions and 78 deletions

View File

@@ -268,6 +268,6 @@ impl<'a, 'b> fold::DocFolder for CoverageCalculator<'a, 'b> {
}
}
self.fold_item_recur(i)
Some(self.fold_item_recur(i))
}
}