11use super :: * ;
2+ #[ allow( dead_code) ]
23struct BreakPoints {
34 break_points : FxHashMap < PeerID , FxHashSet < Counter > > ,
45 /// start ID to ID. The target ID may be in the middle of an op.
@@ -7,6 +8,7 @@ struct BreakPoints {
78 links : FxHashMap < ID , Vec < ID > > ,
89}
910
11+ #[ allow( dead_code) ]
1012struct Output {
1113 clients : FxHashMap < PeerID , Vec < IdSpan > > ,
1214 /// start ID to start ID.
@@ -15,6 +17,7 @@ struct Output {
1517 links : FxHashMap < ID , Vec < ID > > ,
1618}
1719
20+ #[ allow( dead_code) ]
1821fn to_str ( output : Output ) -> String {
1922 let mut s = String :: new ( ) ;
2023 let mut indent_level = 0 ;
@@ -70,6 +73,7 @@ fn to_str(output: Output) -> String {
7073 s
7174}
7275
76+ #[ allow( dead_code) ]
7377fn break_points_to_output ( input : BreakPoints ) -> Output {
7478 let mut output = Output {
7579 clients : FxHashMap :: default ( ) ,
@@ -112,6 +116,7 @@ fn break_points_to_output(input: BreakPoints) -> Output {
112116 output
113117}
114118
119+ #[ allow( dead_code) ]
115120fn get_dag_break_points < T : DagNode > ( dag : & impl Dag < Node = T > ) -> BreakPoints {
116121 let mut break_points = BreakPoints {
117122 break_points : FxHashMap :: default ( ) ,
@@ -140,6 +145,7 @@ fn get_dag_break_points<T: DagNode>(dag: &impl Dag<Node = T>) -> BreakPoints {
140145 break_points
141146}
142147
148+ #[ allow( dead_code) ]
143149pub ( crate ) fn dag_to_mermaid < T : DagNode > ( dag : & impl Dag < Node = T > ) -> String {
144150 to_str ( break_points_to_output ( get_dag_break_points ( dag) ) )
145151}
0 commit comments