@@ -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 ( ) ;
@@ -798,7 +798,7 @@ impl<'a> Cfg<'a> {
798
798
Err ( RustupError :: ToolchainNotInstalled ( _) ) => {
799
799
DistributableToolchain :: install (
800
800
self ,
801
- & toolchain,
801
+ toolchain,
802
802
& components,
803
803
& targets,
804
804
profile,
@@ -808,7 +808,7 @@ impl<'a> Cfg<'a> {
808
808
}
809
809
Ok ( mut distributable) => {
810
810
if verbose {
811
- ( self . notify_handler ) ( Notification :: UsingExistingToolchain ( & toolchain) ) ;
811
+ ( self . notify_handler ) ( Notification :: UsingExistingToolchain ( toolchain) ) ;
812
812
}
813
813
let status = if !distributable. components_exist ( & components, & targets) ? {
814
814
distributable. update ( & components, & targets, profile) . await ?
0 commit comments