@@ -10,7 +10,7 @@ use anyhow::{Context, Result, anyhow, bail};
1010use futures_util:: stream:: StreamExt ;
1111use std:: sync:: Arc ;
1212use tokio:: sync:: Semaphore ;
13- use tracing:: info;
13+ use tracing:: { info, warn } ;
1414use url:: Url ;
1515
1616use crate :: dist:: component:: {
@@ -229,13 +229,7 @@ impl Manifestation {
229229 component. target . as_ref ( ) ,
230230 ) ) ;
231231
232- tx = self . uninstall_component (
233- component,
234- new_manifest,
235- tx,
236- & download_cfg. notify_handler ,
237- download_cfg. process ,
238- ) ?;
232+ tx = self . uninstall_component ( component, new_manifest, tx, download_cfg. process ) ?;
239233 }
240234
241235 // Install components
@@ -313,7 +307,6 @@ impl Manifestation {
313307 & self ,
314308 manifest : & Manifest ,
315309 tmp_cx : & temp:: Context ,
316- notify_handler : & dyn Fn ( Notification < ' _ > ) ,
317310 process : & Process ,
318311 ) -> Result < ( ) > {
319312 let prefix = self . installation . prefix ( ) ;
@@ -331,7 +324,7 @@ impl Manifestation {
331324 tx. remove_file ( "dist config" , rel_config_path) ?;
332325
333326 for component in config. components {
334- tx = self . uninstall_component ( & component, manifest, tx, notify_handler , process) ?;
327+ tx = self . uninstall_component ( & component, manifest, tx, process) ?;
335328 }
336329 tx. commit ( ) ;
337330
@@ -343,7 +336,6 @@ impl Manifestation {
343336 component : & Component ,
344337 manifest : & Manifest ,
345338 mut tx : Transaction < ' a > ,
346- notify_handler : & dyn Fn ( Notification < ' _ > ) ,
347339 process : & Process ,
348340 ) -> Result < Transaction < ' a > > {
349341 // For historical reasons, the rust-installer component
@@ -357,9 +349,10 @@ impl Manifestation {
357349 } else if let Some ( c) = self . installation . find ( short_name) ? {
358350 tx = c. uninstall ( tx, process) ?;
359351 } else {
360- notify_handler ( Notification :: MissingInstalledComponent (
361- & component. short_name ( manifest) ,
362- ) ) ;
352+ warn ! (
353+ component = %component. short_name( manifest) ,
354+ "component not found during uninstall"
355+ ) ;
363356 }
364357
365358 Ok ( tx)
0 commit comments