From 97e844a032c47d4b3e70d2043f809767e437ac24 Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Mon, 13 Dec 2021 22:58:58 +0100 Subject: fix clippy::single_char_pattern perf findings --- compiler/rustc_graphviz/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_graphviz/src') diff --git a/compiler/rustc_graphviz/src/lib.rs b/compiler/rustc_graphviz/src/lib.rs index edb8bd503e1..e318090ebe1 100644 --- a/compiler/rustc_graphviz/src/lib.rs +++ b/compiler/rustc_graphviz/src/lib.rs @@ -472,7 +472,7 @@ pub trait Labeller<'a> { /// Escape tags in such a way that it is suitable for inclusion in a /// Graphviz HTML label. pub fn escape_html(s: &str) -> String { - s.replace("&", "&").replace("\"", """).replace("<", "<").replace(">", ">") + s.replace('&', "&").replace('\"', """).replace('<', "<").replace('>', ">") } impl<'a> LabelText<'a> { -- cgit 1.4.1-3-g733a5