about summary refs log tree commit diff
path: root/src/librustdoc/html/render/context.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/html/render/context.rs')
-rw-r--r--src/librustdoc/html/render/context.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs
index 6762fba9275..5e4a595627b 100644
--- a/src/librustdoc/html/render/context.rs
+++ b/src/librustdoc/html/render/context.rs
@@ -705,14 +705,12 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
             shared.fs.write(scrape_examples_help_file, v)?;
         }
 
-        if let Some(ref redirections) = shared.redirections {
-            if !redirections.borrow().is_empty() {
-                let redirect_map_path =
-                    self.dst.join(crate_name.as_str()).join("redirect-map.json");
-                let paths = serde_json::to_string(&*redirections.borrow()).unwrap();
-                shared.ensure_dir(&self.dst.join(crate_name.as_str()))?;
-                shared.fs.write(redirect_map_path, paths)?;
-            }
+        if let Some(ref redirections) = shared.redirections && !redirections.borrow().is_empty() {
+            let redirect_map_path =
+                self.dst.join(crate_name.as_str()).join("redirect-map.json");
+            let paths = serde_json::to_string(&*redirections.borrow()).unwrap();
+            shared.ensure_dir(&self.dst.join(crate_name.as_str()))?;
+            shared.fs.write(redirect_map_path, paths)?;
         }
 
         // No need for it anymore.