@@ -23,7 +23,7 @@ pub struct CliArgs {
2323}
2424
2525macro_rules! impl_convert {
26- ( $global_args: expr, $args: expr, $src: ty, $dst: ty) => {
26+ ( $global_args: expr, $args: expr, $src: ty, $dst: ty) => { {
2727 info!(
2828 "The source graph was {}-endian, converting to {}-endian" ,
2929 <$src>:: NAME ,
@@ -122,24 +122,21 @@ macro_rules! impl_convert {
122122 . context( "Could not write gamma" ) ?;
123123 pl. light_update( ) ;
124124 pl. done( ) ;
125- offsets_writer. flush( ) . context( "Could not flush offsets" ) ?;
126- } ;
125+ offsets_writer
126+ . flush( )
127+ . context( "Could not flush offsets" )
128+ . map( |_| ( ) )
129+ } } ;
127130}
128131
129132pub fn main ( global_args : GlobalArgs , args : CliArgs ) -> Result < ( ) > {
130133 create_parent_dir ( & args. dst ) ?;
131134
132135 match get_endianness ( & args. src ) ?. as_str ( ) {
133136 #[ cfg( feature = "be_bins" ) ]
134- BE :: NAME => {
135- impl_convert ! ( global_args, args, BE , LE ) ;
136- }
137+ BE :: NAME => impl_convert ! ( global_args, args, BE , LE ) ,
137138 #[ cfg( feature = "le_bins" ) ]
138- LE :: NAME => {
139- impl_convert ! ( global_args, args, LE , BE ) ;
140- }
139+ LE :: NAME => impl_convert ! ( global_args, args, LE , BE ) ,
141140 e => panic ! ( "Unknown endianness: {}" , e) ,
142- } ;
143-
144- Ok ( ( ) )
141+ }
145142}
0 commit comments