Skip to content

Commit

Permalink
style(config): replace dist::Profile with Profile
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Aug 5, 2024
1 parent 00f5572 commit 86a57c3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ enum OverrideCfg {
toolchain: ToolchainDesc,
components: Vec<String>,
targets: Vec<String>,
profile: Option<dist::Profile>,
profile: Option<Profile>,
},
}

Expand Down Expand Up @@ -175,7 +175,7 @@ impl OverrideCfg {
.toolchain
.profile
.as_deref()
.map(dist::Profile::from_str)
.map(Profile::from_str)
.transpose()?,
}
}
Expand Down Expand Up @@ -230,7 +230,7 @@ impl From<LocalToolchainName> for OverrideCfg {
pub(crate) const UNIX_FALLBACK_SETTINGS: &str = "/etc/rustup/settings.toml";

pub(crate) struct Cfg<'a> {
profile_override: Option<dist::Profile>,
profile_override: Option<Profile>,
pub rustup_dir: PathBuf,
pub settings_file: SettingsFile,
pub fallback_settings: Option<FallbackSettings>,
Expand Down Expand Up @@ -348,7 +348,7 @@ impl<'a> Cfg<'a> {
}
}

pub(crate) fn set_profile_override(&mut self, profile: dist::Profile) {
pub(crate) fn set_profile_override(&mut self, profile: Profile) {
self.profile_override = Some(profile);
}

Expand Down Expand Up @@ -391,7 +391,7 @@ impl<'a> Cfg<'a> {
// if there is no profile in the settings file. The last variant happens when
// a user upgrades from a version of Rustup without profiles to a version of
// Rustup with profiles.
pub(crate) fn get_profile(&self) -> Result<dist::Profile> {
pub(crate) fn get_profile(&self) -> Result<Profile> {
if let Some(p) = self.profile_override {
return Ok(p);
}
Expand Down

0 comments on commit 86a57c3

Please sign in to comment.