about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-04-22 22:00:26 -0400
committerJoshua Nelson <jyn514@gmail.com>2021-05-20 09:50:46 -0400
commit132211bce500096330b893e939968f6b2fd5cfb0 (patch)
tree9f34b46f1b78c8b032f022f7e8d7a48ffd21ccf3
parent3e99439f4dacc8ba0d2ca48d221694362d587927 (diff)
downloadrust-132211bce500096330b893e939968f6b2fd5cfb0.tar.gz
rust-132211bce500096330b893e939968f6b2fd5cfb0.zip
Remove `to_url_str`
-rw-r--r--src/librustdoc/clean/types.rs4
-rw-r--r--src/librustdoc/html/format.rs4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs
index edd3d77eeb7..86b952e1bf7 100644
--- a/src/librustdoc/clean/types.rs
+++ b/src/librustdoc/clean/types.rs
@@ -1860,10 +1860,6 @@ impl PrimitiveType {
         })
     }
 
-    crate fn to_url_str(&self) -> &'static str {
-        self.as_str()
-    }
-
     crate fn as_sym(&self) -> Symbol {
         use PrimitiveType::*;
         match self {
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index fa57c9bda74..e6e2f011906 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -574,7 +574,7 @@ fn primitive_link(
                     f,
                     "<a class=\"primitive\" href=\"{}primitive.{}.html\">",
                     "../".repeat(len),
-                    prim.to_url_str()
+                    prim.as_str()
                 )?;
                 needs_termination = true;
             }
@@ -603,7 +603,7 @@ fn primitive_link(
                         f,
                         "<a class=\"primitive\" href=\"{}/primitive.{}.html\">",
                         loc.join("/"),
-                        prim.to_url_str()
+                        prim.as_str()
                     )?;
                     needs_termination = true;
                 }