@@ -3,7 +3,7 @@ use crate::{
33 data_tree:: { DataTree , DataTreeReflection } ,
44 fs_tree_builder:: FsTreeBuilder ,
55 get_size:: GetSize ,
6- json_data:: { BinaryVersion , JsonData , SchemaVersion , UnitAndTree } ,
6+ json_data:: { BinaryVersion , JsonData , JsonDataBody , SchemaVersion } ,
77 os_string_display:: OsStringDisplay ,
88 reporter:: ParallelReporter ,
99 runtime_error:: RuntimeError ,
2020 Report : ParallelReporter < Size > + Sync ,
2121 Size : size:: Size + Into < u64 > + Serialize + Send + Sync ,
2222 SizeGetter : GetSize < Size = Size > + Copy + Sync ,
23- DataTreeReflection < String , Size > : Into < UnitAndTree > ,
23+ DataTreeReflection < String , Size > : Into < JsonDataBody > ,
2424{
2525 /// List of files and/or directories.
2626 pub files : Vec < PathBuf > ,
5151 Size : size:: Size + Into < u64 > + Serialize + Send + Sync ,
5252 Report : ParallelReporter < Size > + Sync ,
5353 SizeGetter : GetSize < Size = Size > + Copy + Sync ,
54- DataTreeReflection < String , Size > : Into < UnitAndTree > ,
54+ DataTreeReflection < String , Size > : Into < JsonDataBody > ,
5555{
5656 /// Run the sub program.
5757 pub fn run ( self ) -> Result < ( ) , RuntimeError > {
@@ -126,15 +126,15 @@ where
126126 GLOBAL_STATUS_BOARD . clear_line ( 0 ) ;
127127
128128 if json_output {
129- let unit_and_tree : UnitAndTree = data_tree
129+ let body : JsonDataBody = data_tree
130130 . into_reflection ( ) // I really want to use std::mem::transmute here but can't.
131131 . par_convert_names_to_utf8 ( ) // TODO: allow non-UTF8 somehow.
132132 . expect ( "convert all names from raw string to UTF-8" )
133133 . into ( ) ;
134134 let json_data = JsonData {
135135 schema_version : SchemaVersion ,
136136 binary_version : Some ( BinaryVersion :: current ( ) ) ,
137- unit_and_tree ,
137+ body ,
138138 } ;
139139 return serde_json:: to_writer ( stdout ( ) , & json_data)
140140 . map_err ( RuntimeError :: SerializationFailure ) ;
0 commit comments