diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
commit | d1b2d29528b7794b41e66fc2136e395a02f8529b (patch) | |
tree | a4a17504b260206dec3cf55b2dca82929a348ac2 /compiler/rustc_incremental/src/assert_dep_graph.rs | |
parent | Releasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip |
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_incremental/src/assert_dep_graph.rs')
-rw-r--r-- | compiler/rustc_incremental/src/assert_dep_graph.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_incremental/src/assert_dep_graph.rs b/compiler/rustc_incremental/src/assert_dep_graph.rs index 52a84b204..5e7ae3ecd 100644 --- a/compiler/rustc_incremental/src/assert_dep_graph.rs +++ b/compiler/rustc_incremental/src/assert_dep_graph.rs @@ -241,16 +241,16 @@ fn dump_graph(query: &DepGraphQuery) { { // dump a .txt file with just the edges: - let txt_path = format!("{}.txt", path); + let txt_path = format!("{path}.txt"); let mut file = BufWriter::new(File::create(&txt_path).unwrap()); for (source, target) in &edges { - write!(file, "{:?} -> {:?}\n", source, target).unwrap(); + write!(file, "{source:?} -> {target:?}\n").unwrap(); } } { // dump a .dot file in graphviz format: - let dot_path = format!("{}.dot", path); + let dot_path = format!("{path}.dot"); let mut v = Vec::new(); dot::render(&GraphvizDepGraph(nodes, edges), &mut v).unwrap(); fs::write(dot_path, v).unwrap(); @@ -285,7 +285,7 @@ impl<'a> dot::Labeller<'a> for GraphvizDepGraph { dot::Id::new("DependencyGraph").unwrap() } fn node_id(&self, n: &DepKind) -> dot::Id<'_> { - let s: String = format!("{:?}", n) + let s: String = format!("{n:?}") .chars() .map(|c| if c == '_' || c.is_alphanumeric() { c } else { '_' }) .collect(); @@ -293,7 +293,7 @@ impl<'a> dot::Labeller<'a> for GraphvizDepGraph { dot::Id::new(s).unwrap() } fn node_label(&self, n: &DepKind) -> dot::LabelText<'_> { - dot::LabelText::label(format!("{:?}", n)) + dot::LabelText::label(format!("{n:?}")) } } |