about summary refs log tree commit diff
path: root/src/librustdoc/html/format.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-02-16 10:54:28 +0100
committerRalf Jung <post@ralfj.de>2023-02-16 10:54:28 +0100
commit044aa87d7808f89c38a79d8c68d03249246bf9cb (patch)
tree84aa26d240aff1e24fe4ea6b57439dc885e98f44 /src/librustdoc/html/format.rs
parentf0ab39b60ef631da86a5069935fdc9ba2e5d0def (diff)
parentfd8947095678c61c5cbc70509e053621baca282d (diff)
Merge from rustc
Diffstat (limited to 'src/librustdoc/html/format.rs')
-rw-r--r--src/librustdoc/html/format.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 314f0612249..1ed0b0bc2d5 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -710,11 +710,9 @@ pub(crate) fn href_with_root_path(
             }
         }
     };
-    if !is_remote {
-        if let Some(root_path) = root_path {
-            let root = root_path.trim_end_matches('/');
-            url_parts.push_front(root);
-        }
+    if !is_remote && let Some(root_path) = root_path {
+        let root = root_path.trim_end_matches('/');
+        url_parts.push_front(root);
     }
     debug!(?url_parts);
     match shortty {