summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_graphviz
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /compiler/rustc_graphviz
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_graphviz')
-rw-r--r--compiler/rustc_graphviz/src/lib.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_graphviz/src/lib.rs b/compiler/rustc_graphviz/src/lib.rs
index 1f8268cc1..b70a55e89 100644
--- a/compiler/rustc_graphviz/src/lib.rs
+++ b/compiler/rustc_graphviz/src/lib.rs
@@ -164,7 +164,7 @@
//! fn node_id(&'a self, n: &Nd) -> dot::Id<'a> {
//! dot::Id::new(format!("N{}", n)).unwrap()
//! }
-//! fn node_label<'b>(&'b self, n: &Nd) -> dot::LabelText<'b> {
+//! fn node_label(&self, n: &Nd) -> dot::LabelText<'_> {
//! dot::LabelText::LabelStr(self.nodes[*n].into())
//! }
//! fn edge_label<'b>(&'b self, _: &Ed) -> dot::LabelText<'b> {
@@ -516,7 +516,7 @@ impl<'a> LabelText<'a> {
match *self {
LabelStr(ref s) => format!("\"{}\"", s.escape_default()),
EscStr(ref s) => format!("\"{}\"", LabelText::escape_str(s)),
- HtmlStr(ref s) => format!("<{}>", s),
+ HtmlStr(ref s) => format!("<{s}>"),
}
}
@@ -622,7 +622,7 @@ where
if let Some(fontname) = options.iter().find_map(|option| {
if let RenderOption::Fontname(fontname) = option { Some(fontname) } else { None }
}) {
- font = format!(r#"fontname="{}""#, fontname);
+ font = format!(r#"fontname="{fontname}""#);
graph_attrs.push(&font[..]);
content_attrs.push(&font[..]);
}
@@ -635,8 +635,8 @@ where
if !(graph_attrs.is_empty() && content_attrs.is_empty()) {
writeln!(w, r#" graph[{}];"#, graph_attrs.join(" "))?;
let content_attrs_str = content_attrs.join(" ");
- writeln!(w, r#" node[{}];"#, content_attrs_str)?;
- writeln!(w, r#" edge[{}];"#, content_attrs_str)?;
+ writeln!(w, r#" node[{content_attrs_str}];"#)?;
+ writeln!(w, r#" edge[{content_attrs_str}];"#)?;
}
let mut text = Vec::new();
@@ -649,7 +649,7 @@ where
write!(text, "{}", id.as_slice()).unwrap();
if !options.contains(&RenderOption::NoNodeLabels) {
- write!(text, "[label={}]", escaped).unwrap();
+ write!(text, "[label={escaped}]").unwrap();
}
let style = g.node_style(n);
@@ -678,7 +678,7 @@ where
write!(text, "{} -> {}", source_id.as_slice(), target_id.as_slice()).unwrap();
if !options.contains(&RenderOption::NoEdgeLabels) {
- write!(text, "[label={}]", escaped_label).unwrap();
+ write!(text, "[label={escaped_label}]").unwrap();
}
let style = g.edge_style(e);