@@ -80,13 +80,14 @@ fn json_output() {
8080 . tree
8181 . pipe ( sanitize_tree_reflection) ;
8282 dbg ! ( & actual) ;
83- let builder = FsTreeBuilder {
84- root : workspace. to_path_buf ( ) ,
85- size_getter : GetApparentSize ,
86- hardlinks_recorder : & HardlinkIgnorant ,
87- reporter : & ErrorOnlyReporter :: new ( ErrorReport :: SILENT ) ,
88- max_depth : 10 ,
89- } ;
83+ let reporter = ErrorOnlyReporter :: new ( ErrorReport :: SILENT ) ;
84+ let builder = FsTreeBuilder :: builder ( )
85+ . root ( workspace. to_path_buf ( ) )
86+ . size_getter ( GetApparentSize )
87+ . hardlinks_recorder ( & HardlinkIgnorant )
88+ . reporter ( & reporter)
89+ . max_depth ( 10 )
90+ . build ( ) ;
9091 let expected = builder
9192 . pipe ( DataTree :: < _ , Bytes > :: from)
9293 . into_reflection ( )
@@ -135,13 +136,14 @@ fn json_input() {
135136 let actual = actual. trim_end ( ) ;
136137 eprintln ! ( "ACTUAL:\n {actual}\n " ) ;
137138
138- let visualizer = Visualizer {
139- data_tree : & sample_tree ( ) ,
140- bytes_format : BytesFormat :: MetricUnits ,
141- direction : Direction :: BottomUp ,
142- bar_alignment : BarAlignment :: Left ,
143- column_width_distribution : ColumnWidthDistribution :: total ( 100 ) ,
144- } ;
139+ let tree = sample_tree ( ) ;
140+ let visualizer = Visualizer :: builder ( )
141+ . data_tree ( & tree)
142+ . bytes_format ( BytesFormat :: MetricUnits )
143+ . direction ( Direction :: BottomUp )
144+ . bar_alignment ( BarAlignment :: Left )
145+ . column_width_distribution ( ColumnWidthDistribution :: total ( 100 ) )
146+ . build ( ) ;
145147 let expected = format ! ( "{visualizer}" ) ;
146148 let expected = expected. trim_end ( ) ;
147149 eprintln ! ( "EXPECTED:\n {expected}\n " ) ;
0 commit comments