@@ -265,18 +265,16 @@ impl Manifestation {
265
265
component. target . as_ref ( ) ,
266
266
) ) ;
267
267
268
- let notification_converter = |notification : crate :: utils:: Notification < ' _ > | {
269
- ( download_cfg. notify_handler ) ( notification. into ( ) ) ;
270
- } ;
271
-
272
268
let cx = PackageContext {
273
269
tmp_cx,
274
- notify_handler : Some ( & notification_converter ) ,
270
+ notify_handler : Some ( download_cfg . notify_handler ) ,
275
271
process : download_cfg. process ,
276
272
} ;
277
273
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
+ ) ?;
280
278
let package = match format {
281
279
CompressionKind :: GZip => & TarGzPackage :: new ( reader, & cx) ? as & dyn Package ,
282
280
CompressionKind :: XZ => & TarXzPackage :: new ( reader, & cx) ?,
@@ -487,14 +485,10 @@ impl Manifestation {
487
485
}
488
486
489
487
// 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) ?;
495
489
let cx = PackageContext {
496
490
tmp_cx,
497
- notify_handler : Some ( & notification_converter ) ,
491
+ notify_handler : Some ( notify_handler ) ,
498
492
process,
499
493
} ;
500
494
0 commit comments