@@ -90,7 +90,7 @@ impl EGraph {
9090 // Add nodes
9191 for ( node_id, node) in nodes {
9292 let label = node. op . as_ref ( ) ;
93- let tooltip = format ! ( "{}: {}" , class_id , node_id ) ;
93+ let tooltip = format ! ( "{class_id }: {node_id}" ) ;
9494 let html_label = html_label ( label, node. children . len ( ) ) ;
9595 let quoted_tooltip = quote ( & tooltip) ;
9696 let quoted_node_id = quote ( node_id. as_ref ( ) ) ;
@@ -99,7 +99,7 @@ impl EGraph {
9999 let source = node_id ! ( quoted_node_id, port!( id!( i) , "s" ) ) ;
100100 let target = node_id ! ( quote( child. as_ref( ) ) ) ;
101101 let child_eclass = node_to_class. get ( child) . unwrap ( ) ;
102- let child_subgraph_id = format ! ( "cluster_{}" , child_eclass ) ;
102+ let child_subgraph_id = format ! ( "cluster_{child_eclass}" ) ;
103103 let edge = edge ! ( source => target; EdgeAttributes :: lhead( quote( & child_subgraph_id) ) ) ;
104104 // Make sure edge is part of outer statements so it doesn't add nodes to the subgraph which
105105 // don't belong there
@@ -109,8 +109,8 @@ impl EGraph {
109109 inner_stmts. push ( stmt ! ( node) ) ;
110110 }
111111
112- let subgraph_id = format ! ( "cluster_{}" , class_id ) ;
113- let outer_subgraph_id = quote ( & format ! ( "outer_{}" , subgraph_id ) ) ;
112+ let subgraph_id = format ! ( "cluster_{class_id}" ) ;
113+ let outer_subgraph_id = quote ( & format ! ( "outer_{subgraph_id}" ) ) ;
114114 let quoted_subgraph_id = quote ( & subgraph_id) ;
115115
116116 let subgraph = subgraph ! ( outer_subgraph_id;
@@ -150,15 +150,15 @@ const INITIAL_COLOR: usize = 2;
150150fn html_label ( label : & str , n_args : usize ) -> String {
151151 format ! (
152152 "<<TABLE BGCOLOR=\" white\" CELLBORDER=\" 0\" CELLSPACING=\" 0\" CELLPADDING=\" 0\" style=\" rounded\" ><tr><td BALIGN=\" left\" CELLPADDING=\" 4\" WIDTH=\" 30\" HEIGHT=\" 30\" {}>{}</td></tr>{}</TABLE>>" ,
153- ( if n_args == 0 { "" . to_string( ) } else { format!( " colspan=\" {}\" " , n_args ) } ) ,
153+ ( if n_args == 0 { "" . to_string( ) } else { format!( " colspan=\" {n_args }\" " ) } ) ,
154154 Escape ( label) ,
155155 ( if n_args == 0 {
156156 "" . to_string( )
157157 } else {
158158 format!(
159159 "<TR>{}</TR>" ,
160160 ( 0 ..n_args)
161- . map( |i| format!( "<TD PORT=\" {}\" ></TD>" , i ) )
161+ . map( |i| format!( "<TD PORT=\" {i }\" ></TD>" ) )
162162 . collect:: <Vec <String >>( )
163163 . join( "" )
164164 )
@@ -168,7 +168,7 @@ fn html_label(label: &str, n_args: usize) -> String {
168168
169169/// Adds double quotes and escapes the quotes in the string
170170fn quote ( s : & str ) -> String {
171- format ! ( "{:?}" , s )
171+ format ! ( "{s :?}" )
172172}
173173
174174// Copied from https://doc.rust-lang.org/stable/nightly-rustc/src/rustdoc/html/escape.rs.html#10
0 commit comments