@@ -3,7 +3,7 @@ use crate::{
33 data_tree:: DataTree ,
44 fs_tree_builder:: FsTreeBuilder ,
55 get_size:: GetSize ,
6- hardlink:: { DeduplicateSharedSize , HardlinkIgnorant , HardlinkListReflection , RecordHardlinks } ,
6+ hardlink:: { DeduplicateSharedSize , HardlinkIgnorant , RecordHardlinks } ,
77 json_data:: { BinaryVersion , JsonData , JsonDataBody , JsonShared , JsonTree , SchemaVersion } ,
88 os_string_display:: OsStringDisplay ,
99 reporter:: ParallelReporter ,
@@ -140,13 +140,10 @@ where
140140 . into_reflection ( ) // I really want to use std::mem::transmute here but can't.
141141 . par_convert_names_to_utf8 ( ) // TODO: allow non-UTF8 somehow.
142142 . expect ( "convert all names from raw string to UTF-8" ) ;
143- let details = deduplication_record
143+ let shared = deduplication_record
144144 . map_err ( HardlinksHandler :: convert_error) ?
145- . pipe ( HardlinksHandler :: serializable_report) ?;
146- let shared = JsonShared {
147- details,
148- summary : None , // TODO
149- } ;
145+ . pipe ( HardlinksHandler :: serializable_report) ?
146+ . unwrap_or_default ( ) ;
150147 let json_tree = JsonTree { tree, shared } ;
151148 let json_data = JsonData {
152149 schema_version : SchemaVersion ,
@@ -184,9 +181,7 @@ pub trait HardlinkSubroutines<Size: size::Size>: DeduplicateSharedSize<Size> {
184181 bytes_format : Size :: DisplayFormat ,
185182 ) -> Result < ( ) , RuntimeError > ;
186183 /// Create a JSON serializable object from the report.
187- fn serializable_report (
188- report : Self :: Report ,
189- ) -> Result < Option < HardlinkListReflection < Size > > , RuntimeError > ;
184+ fn serializable_report ( report : Self :: Report ) -> Result < Option < JsonShared < Size > > , RuntimeError > ;
190185}
191186
192187impl < Size > HardlinkSubroutines < Size > for HardlinkIgnorant
@@ -202,9 +197,7 @@ where
202197 Ok ( ( ) )
203198 }
204199
205- fn serializable_report (
206- ( ) : Self :: Report ,
207- ) -> Result < Option < HardlinkListReflection < Size > > , RuntimeError > {
200+ fn serializable_report ( ( ) : Self :: Report ) -> Result < Option < JsonShared < Size > > , RuntimeError > {
208201 Ok ( None )
209202 }
210203}
0 commit comments