@@ -34,7 +34,7 @@ fn build_dot_graph(
3434 settings : & Settings ,
3535 subgraph_nest_level : usize ,
3636) {
37- let fmt_label = |label : Interned < dyn RenderLabel > | format ! ( "{:?}" , label ) ;
37+ let fmt_label = |label : Interned < dyn RenderLabel > | format ! ( "{label :?}" ) ;
3838
3939 let node_mapping: HashMap < _ , _ > = graph
4040 . iter_nodes ( )
@@ -62,11 +62,11 @@ fn build_dot_graph(
6262 let next_layer_style =
6363 & settings. style . layers [ ( subgraph_nest_level + 1 ) % settings. style . layers . len ( ) ] ;
6464
65- for ( name, subgraph) in sorted ( graph. iter_sub_graphs ( ) , |( name, _) | format ! ( "{:?}" , name ) ) {
65+ for ( name, subgraph) in sorted ( graph. iter_sub_graphs ( ) , |( name, _) | format ! ( "{name :?}" ) ) {
6666 let internal_name = format ! ( "{}_{:?}" , graph_name. unwrap_or_default( ) , name) ;
6767 let mut sub_dot = DotGraph :: subgraph (
6868 & internal_name,
69- & [ ( "label" , & format ! ( "{:?}" , name ) ) , ( "fontcolor" , "red" ) ] ,
69+ & [ ( "label" , & format ! ( "{name :?}" ) ) , ( "fontcolor" , "red" ) ] ,
7070 )
7171 . graph_attributes ( & [
7272 ( "style" , "rounded,filled" ) ,
@@ -94,7 +94,7 @@ fn build_dot_graph(
9494 . map ( |( index, slot) | {
9595 format ! (
9696 "<TD PORT=\" {}\" >{}: {}</TD>" ,
97- html_escape( & format!( "in-{}" , index ) ) ,
97+ html_escape( & format!( "in-{index}" ) ) ,
9898 html_escape( & slot. name) ,
9999 html_escape( & format!( "{:?}" , slot. slot_type) )
100100 )
@@ -108,7 +108,7 @@ fn build_dot_graph(
108108 . map ( |( index, slot) | {
109109 format ! (
110110 "<TD PORT=\" {}\" >{}: {}</TD>" ,
111- html_escape( & format!( "out-{}" , index ) ) ,
111+ html_escape( & format!( "out-{index}" ) ) ,
112112 html_escape( & slot. name) ,
113113 html_escape( & format!( "{:?}" , slot. slot_type) )
114114 )
@@ -117,12 +117,12 @@ fn build_dot_graph(
117117
118118 let slots = iter_utils:: zip_longest ( inputs. iter ( ) , outputs. iter ( ) )
119119 . map ( |pair| match pair {
120- EitherOrBoth :: Both ( input, output) => format ! ( "<TR>{}{ }</TR>" , input , output ) ,
120+ EitherOrBoth :: Both ( input, output) => format ! ( "<TR>{input}{output }</TR>" ) ,
121121 EitherOrBoth :: Left ( input) => {
122- format ! ( "<TR>{}<TD BORDER=\" 0\" > </TD></TR>" , input )
122+ format ! ( "<TR>{input }<TD BORDER=\" 0\" > </TD></TR>" )
123123 }
124124 EitherOrBoth :: Right ( output) => {
125- format ! ( "<TR><TD BORDER=\" 0\" > </TD>{}</TR>" , output )
125+ format ! ( "<TR><TD BORDER=\" 0\" > </TD>{output }</TR>" )
126126 }
127127 } )
128128 . collect :: < String > ( ) ;
@@ -155,9 +155,9 @@ fn build_dot_graph(
155155 } => {
156156 dot. add_edge_with_ports (
157157 & node_id ( output_node) ,
158- Some ( & format ! ( "out-{}:e" , output_index ) ) ,
158+ Some ( & format ! ( "out-{output_index }:e" ) ) ,
159159 & node_id ( input_node) ,
160- Some ( & format ! ( "in-{}:w" , input_index ) ) ,
160+ Some ( & format ! ( "in-{input_index }:w" ) ) ,
161161 & [ ( "color" , & layer_style. color_edge_slot ) ] ,
162162 ) ;
163163 }
0 commit comments