diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-11-29 11:01:17 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-12-01 17:34:43 +0000 |
| commit | f2b97a8bfe23cdda293908e3c3e01f2613787168 (patch) | |
| tree | a7fe31c1e002272731591d9f0e2337f19de420d3 /compiler/rustc_graphviz/src | |
| parent | 9c0bc3028a575eece6d4e8fbc6624cb95b9c9893 (diff) | |
| download | rust-f2b97a8bfe23cdda293908e3c3e01f2613787168.tar.gz rust-f2b97a8bfe23cdda293908e3c3e01f2613787168.zip | |
Remove useless borrows and derefs
Diffstat (limited to 'compiler/rustc_graphviz/src')
| -rw-r--r-- | compiler/rustc_graphviz/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_graphviz/src/lib.rs b/compiler/rustc_graphviz/src/lib.rs index 401d3f6689c..1f8268cc17c 100644 --- a/compiler/rustc_graphviz/src/lib.rs +++ b/compiler/rustc_graphviz/src/lib.rs @@ -410,7 +410,7 @@ impl<'a> Id<'a> { } pub fn as_slice(&'a self) -> &'a str { - &*self.name + &self.name } } @@ -515,7 +515,7 @@ impl<'a> LabelText<'a> { pub fn to_dot_string(&self) -> String { match *self { LabelStr(ref s) => format!("\"{}\"", s.escape_default()), - EscStr(ref s) => format!("\"{}\"", LabelText::escape_str(&s)), + EscStr(ref s) => format!("\"{}\"", LabelText::escape_str(s)), HtmlStr(ref s) => format!("<{}>", s), } } @@ -529,7 +529,7 @@ impl<'a> LabelText<'a> { EscStr(s) => s, LabelStr(s) => { if s.contains('\\') { - (&*s).escape_default().to_string().into() + s.escape_default().to_string().into() } else { s } |
