@@ -231,7 +231,7 @@ impl From<LocalToolchainName> for OverrideCfg {
231231pub ( crate ) const UNIX_FALLBACK_SETTINGS : & str = "/etc/rustup/settings.toml" ;
232232
233233pub ( crate ) struct Cfg < ' a > {
234- profile_override : Option < Profile > ,
234+ pub profile_override : Option < Profile > ,
235235 pub rustup_dir : PathBuf ,
236236 pub settings_file : SettingsFile ,
237237 pub fallback_settings : Option < FallbackSettings > ,
@@ -330,10 +330,6 @@ impl<'a> Cfg<'a> {
330330 Ok ( cfg)
331331 }
332332
333- pub ( crate ) fn set_profile_override ( & mut self , profile : Profile ) {
334- self . profile_override = Some ( profile) ;
335- }
336-
337333 pub ( crate ) fn set_default ( & self , toolchain : Option < & ToolchainName > ) -> Result < ( ) > {
338334 self . settings_file . with_mut ( |s| {
339335 s. default_toolchain = toolchain. map ( |t| t. to_string ( ) ) ;
@@ -367,10 +363,6 @@ impl<'a> Cfg<'a> {
367363 Ok ( ( ) )
368364 }
369365
370- pub ( crate ) fn set_toolchain_override ( & mut self , toolchain_override : & ResolvableToolchainName ) {
371- self . toolchain_override = Some ( toolchain_override. to_owned ( ) ) ;
372- }
373-
374366 pub ( crate ) fn set_auto_install ( & mut self , mode : AutoInstallMode ) -> Result < ( ) > {
375367 self . settings_file . with_mut ( |s| {
376368 s. auto_install = Some ( mode) ;
@@ -710,7 +702,7 @@ impl<'a> Cfg<'a> {
710702 pub ( crate ) async fn active_rustc_version ( & mut self ) -> Result < Option < String > > {
711703 if let Some ( t) = self . process . args ( ) . find ( |x| x. starts_with ( '+' ) ) {
712704 trace ! ( "Fetching rustc version from toolchain `{}`" , t) ;
713- self . set_toolchain_override ( & ResolvableToolchainName :: try_from ( & t[ 1 ..] ) ?) ;
705+ self . toolchain_override = Some ( ResolvableToolchainName :: try_from ( & t[ 1 ..] ) ?) ;
714706 }
715707
716708 let Some ( ( name, _) ) = self . maybe_ensure_active_toolchain ( None ) . await ? else {
0 commit comments