summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_graphviz
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /compiler/rustc_graphviz
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.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);