File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,14 @@ use std::path::PathBuf;
1313use std:: process:: { Child , ChildStdin , Command , Stdio } ;
1414
1515#[ cfg( unix) ]
16- const HTML_HEADER : & [ u8 ] = b"<!DOCTYPE html>\n <style>svg { width: 100%; }</style>\n \n " ;
16+ const HTML_HEADER : & [ u8 ] = b"
17+ <!DOCTYPE html>
18+
19+ <style>
20+ svg { width: 100%; }
21+ </style>
22+
23+ " ;
1724
1825pub fn cancel_on_stdin ( ) -> Arc < AtomicUsize > {
1926 let result = Arc :: new ( AtomicUsize :: new ( 0 ) ) ;
@@ -40,25 +47,30 @@ pub struct LogSession {
4047 dot_process_stdin : Option < ChildStdin > ,
4148}
4249
50+ #[ cfg( windows) ]
51+ pub fn print_tree_graph ( _tree : & Tree , _path : & str ) -> Result < ( ) > {
52+ Ok ( ( ) )
53+ }
54+
55+ #[ cfg( windows) ]
56+ pub fn log_graphs ( _parser : & mut Parser , _path : & str ) -> Result < LogSession > {
57+ Ok ( LogSession )
58+ }
59+
60+ #[ cfg( unix) ]
4361pub fn print_tree_graph ( tree : & Tree , path : & str ) -> Result < ( ) > {
4462 let session = LogSession :: new ( path) ?;
4563 tree. print_dot_graph ( session. dot_process_stdin . as_ref ( ) . unwrap ( ) ) ;
4664 Ok ( ( ) )
4765}
4866
67+ #[ cfg( unix) ]
4968pub fn log_graphs ( parser : & mut Parser , path : & str ) -> Result < LogSession > {
5069 let session = LogSession :: new ( path) ?;
5170 parser. print_dot_graphs ( session. dot_process_stdin . as_ref ( ) . unwrap ( ) ) ;
5271 Ok ( session)
5372}
5473
55- #[ cfg( windows) ]
56- impl LogSession {
57- fn new ( path : & str ) -> Result < Self > {
58- Ok ( Self )
59- }
60- }
61-
6274#[ cfg( unix) ]
6375impl LogSession {
6476 fn new ( path : & str ) -> Result < Self > {
You can’t perform that action at this time.
0 commit comments