@@ -752,7 +752,7 @@ impl<'a> Cfg<'a> {
752
752
profile,
753
753
} => {
754
754
let toolchain = self
755
- . ensure_installed ( toolchain, components, targets, profile, false )
755
+ . ensure_installed ( & toolchain, components, targets, profile, false )
756
756
. await ?
757
757
. 1 ;
758
758
Ok ( ( toolchain, reason) )
@@ -768,7 +768,7 @@ impl<'a> Cfg<'a> {
768
768
Some ( ToolchainName :: Official ( toolchain_desc) ) => {
769
769
let reason = ActiveReason :: Default ;
770
770
let toolchain = self
771
- . ensure_installed ( toolchain_desc, vec ! [ ] , vec ! [ ] , None , false )
771
+ . ensure_installed ( & toolchain_desc, vec ! [ ] , vec ! [ ] , None , false )
772
772
. await ?
773
773
. 1 ;
774
774
Ok ( ( toolchain, reason) )
@@ -782,14 +782,14 @@ impl<'a> Cfg<'a> {
782
782
#[ tracing:: instrument( level = "trace" , err( level = "trace" ) , skip_all) ]
783
783
pub ( crate ) async fn ensure_installed (
784
784
& self ,
785
- toolchain : ToolchainDesc ,
785
+ toolchain : & ToolchainDesc ,
786
786
components : Vec < String > ,
787
787
targets : Vec < String > ,
788
788
profile : Option < Profile > ,
789
789
verbose : bool ,
790
790
) -> Result < ( UpdateStatus , Toolchain < ' _ > ) > {
791
791
if verbose {
792
- ( self . notify_handler ) ( Notification :: LookingForToolchain ( & toolchain) ) ;
792
+ ( self . notify_handler ) ( Notification :: LookingForToolchain ( toolchain) ) ;
793
793
}
794
794
let components: Vec < _ > = components. iter ( ) . map ( AsRef :: as_ref) . collect ( ) ;
795
795
let targets: Vec < _ > = targets. iter ( ) . map ( AsRef :: as_ref) . collect ( ) ;
@@ -801,7 +801,7 @@ impl<'a> Cfg<'a> {
801
801
Err ( RustupError :: ToolchainNotInstalled ( _) ) => {
802
802
DistributableToolchain :: install (
803
803
self ,
804
- & toolchain,
804
+ toolchain,
805
805
& components,
806
806
& targets,
807
807
profile,
@@ -811,7 +811,7 @@ impl<'a> Cfg<'a> {
811
811
}
812
812
Ok ( mut distributable) => {
813
813
if verbose {
814
- ( self . notify_handler ) ( Notification :: UsingExistingToolchain ( & toolchain) ) ;
814
+ ( self . notify_handler ) ( Notification :: UsingExistingToolchain ( toolchain) ) ;
815
815
}
816
816
let status = if !distributable. components_exist ( & components, & targets) ? {
817
817
distributable. update ( & components, & targets, profile) . await ?
0 commit comments