File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1010extern crate core;
1111
1212use std:: collections:: { HashMap , HashSet } ;
13+ #[ cfg( test) ]
14+ use std:: fmt:: { Debug , Formatter } ;
1315use std:: fs:: File ;
1416use std:: io:: BufReader ;
1517use std:: ops:: Deref ;
@@ -114,6 +116,21 @@ impl<L: Deref + Clone + Send + Sync + 'static> RapidSyncProcessor<L> where L::Ta
114116 }
115117}
116118
119+ #[ cfg( test) ]
120+ impl Debug for SerializedResponse {
121+ fn fmt ( & self , f : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
122+ write ! (
123+ f,
124+ "\n messages: {}\n \t announcements: {}\n \t updates: {}\n \t \t full: {}\n \t \t incremental: {}" ,
125+ self . message_count,
126+ self . announcement_count,
127+ self . update_count,
128+ self . update_count_full,
129+ self . update_count_incremental
130+ )
131+ }
132+ }
133+
117134pub ( crate ) async fn connect_to_db ( ) -> Client {
118135 let connection_config = config:: db_connection_config ( ) ;
119136 let ( client, connection) = connection_config. connect ( NoTls ) . await . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments