@@ -265,18 +265,16 @@ impl Manifestation {
265265 component. target . as_ref ( ) ,
266266 ) ) ;
267267
268- let notification_converter = |notification : crate :: utils:: Notification < ' _ > | {
269- ( download_cfg. notify_handler ) ( notification. into ( ) ) ;
270- } ;
271-
272268 let cx = PackageContext {
273269 tmp_cx,
274- notify_handler : Some ( & notification_converter ) ,
270+ notify_handler : Some ( download_cfg . notify_handler ) ,
275271 process : download_cfg. process ,
276272 } ;
277273
278- let reader =
279- utils:: FileReaderWithProgress :: new_file ( & installer_file, & notification_converter) ?;
274+ let reader = utils:: FileReaderWithProgress :: new_file (
275+ & installer_file,
276+ download_cfg. notify_handler ,
277+ ) ?;
280278 let package = match format {
281279 CompressionKind :: GZip => & TarGzPackage :: new ( reader, & cx) ? as & dyn Package ,
282280 CompressionKind :: XZ => & TarXzPackage :: new ( reader, & cx) ?,
@@ -487,14 +485,10 @@ impl Manifestation {
487485 }
488486
489487 // Install all the components in the installer
490- let notification_converter = |notification : crate :: utils:: Notification < ' _ > | {
491- notify_handler ( notification. into ( ) ) ;
492- } ;
493- let reader =
494- utils:: FileReaderWithProgress :: new_file ( & installer_file, & notification_converter) ?;
488+ let reader = utils:: FileReaderWithProgress :: new_file ( & installer_file, notify_handler) ?;
495489 let cx = PackageContext {
496490 tmp_cx,
497- notify_handler : Some ( & notification_converter ) ,
491+ notify_handler : Some ( notify_handler ) ,
498492 process,
499493 } ;
500494
0 commit comments