From 7b55f08516848a8ce067850ffe98df95dd2596f7 Mon Sep 17 00:00:00 2001 From: TumoiYorozu Date: Tue, 13 Jun 2023 20:14:50 +0900 Subject: [PATCH] Fix URL encoding of % sign in Rust Doc. --- src/librustdoc/html/render/mod.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index f205ff15ec3d0..5bd9389a400af 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -1940,8 +1940,6 @@ pub(crate) fn small_url_encode(s: String) -> String { // While the same is not true for hashes, rustdoc only needs to be // consistent with itself when encoding them. st += "+"; - } else if b == b'%' { - st += "%%"; } else { write!(st, "%{:02X}", b).unwrap(); }