about summary refs log tree commit diff
path: root/src/librustdoc/formats
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-06-10 14:41:23 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-06-10 16:25:02 +1000
commitcc671754a308177c2772b5f7e49939180b97d3a4 (patch)
treee5fb24a664817ac6539aa3abbc75824851ebed71 /src/librustdoc/formats
parentfb644e6a1a7d34c6bbb5ecfe5c185f8c977d6bb3 (diff)
downloadrust-cc671754a308177c2772b5f7e49939180b97d3a4.tar.gz
rust-cc671754a308177c2772b5f7e49939180b97d3a4.zip
Simplify `JsonRenderer`.
- It doesn't need to be cloneable.
- Some of the `Rc`s and `RefCell`s aren't doing anything.
- `after_krate` can consume `self`.
Diffstat (limited to 'src/librustdoc/formats')
-rw-r--r--src/librustdoc/formats/renderer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/formats/renderer.rs b/src/librustdoc/formats/renderer.rs
index 5e4e6f27a15..072b04086f6 100644
--- a/src/librustdoc/formats/renderer.rs
+++ b/src/librustdoc/formats/renderer.rs
@@ -67,7 +67,7 @@ pub(crate) trait FormatRenderer<'tcx>: Sized {
     }
 
     /// Post processing hook for cleanup and dumping output to files.
-    fn after_krate(&mut self) -> Result<(), Error>;
+    fn after_krate(self) -> Result<(), Error>;
 
     fn cache(&self) -> &Cache;
 }