summary refs log tree commit diff
path: root/compiler/rustc_graphviz/src/lib.rs
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2023-11-13 14:43:53 +0300
committerklensy <klensy@users.noreply.github.com>2023-11-23 14:11:02 +0300
commitaff6c741d466610576b02fde72d139aa8c6ec0a8 (patch)
tree0f8154ef568be57bb4f5c611838a8a310942d81b /compiler/rustc_graphviz/src/lib.rs
parent38eecca62c73401043eb5ff01557bb58792631f7 (diff)
downloadrust-aff6c741d466610576b02fde72d139aa8c6ec0a8.tar.gz
rust-aff6c741d466610576b02fde72d139aa8c6ec0a8.zip
remove unused pub fn
Diffstat (limited to 'compiler/rustc_graphviz/src/lib.rs')
-rw-r--r--compiler/rustc_graphviz/src/lib.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/compiler/rustc_graphviz/src/lib.rs b/compiler/rustc_graphviz/src/lib.rs
index 9abd7aec98d..eba3215d931 100644
--- a/compiler/rustc_graphviz/src/lib.rs
+++ b/compiler/rustc_graphviz/src/lib.rs
@@ -522,33 +522,6 @@ impl<'a> LabelText<'a> {
             HtmlStr(ref s) => format!("<{s}>"),
         }
     }
-
-    /// Decomposes content into string suitable for making EscStr that
-    /// yields same content as self. The result obeys the law
-    /// render(`lt`) == render(`EscStr(lt.pre_escaped_content())`) for
-    /// all `lt: LabelText`.
-    fn pre_escaped_content(self) -> Cow<'a, str> {
-        match self {
-            EscStr(s) => s,
-            LabelStr(s) => {
-                if s.contains('\\') {
-                    s.escape_default().to_string().into()
-                } else {
-                    s
-                }
-            }
-            HtmlStr(s) => s,
-        }
-    }
-
-    /// Puts `suffix` on a line below this label, with a blank line separator.
-    pub fn suffix_line(self, suffix: LabelText<'_>) -> LabelText<'static> {
-        let mut prefix = self.pre_escaped_content().into_owned();
-        let suffix = suffix.pre_escaped_content();
-        prefix.push_str(r"\n\n");
-        prefix.push_str(&suffix);
-        EscStr(prefix.into())
-    }
 }
 
 pub type Nodes<'a, N> = Cow<'a, [N]>;