Remove unnecessary after_run function

It's called at the same time and in the same place as `after_krate`, so
they can be combined.
This commit is contained in:
Joshua Nelson
2021-01-19 01:59:45 -05:00
parent 1f0fc02cc8
commit d926147ccb
3 changed files with 30 additions and 23 deletions

View File

@@ -199,7 +199,12 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
Ok(())
}
fn after_krate(&mut self, krate: &clean::Crate, cache: &Cache) -> Result<(), Error> {
fn after_krate(
&mut self,
krate: &clean::Crate,
cache: &Cache,
_diag: &rustc_errors::Handler,
) -> Result<(), Error> {
debug!("Done with crate");
let mut index = (*self.index).clone().into_inner();
index.extend(self.get_trait_items(cache));
@@ -245,8 +250,4 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
serde_json::ser::to_writer(&file, &output).unwrap();
Ok(())
}
fn after_run(&mut self, _diag: &rustc_errors::Handler) -> Result<(), Error> {
Ok(())
}
}