Skip to content

Commit

Permalink
Auto merge of #2753 - RalfJung:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
Rustup

Pulls in rust-lang/rust#104658
  • Loading branch information
bors committed Jan 9, 2023
2 parents b28a04d + 799203e commit 387c591
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}>"),
}
}

Expand Down Expand Up @@ -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[..]);
}
Expand All @@ -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();
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 387c591

Please sign in to comment.