Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
  • Loading branch information
rcoh and Velfi authored Jan 3, 2023
1 parent 694615f commit 5f9829a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aws/rust-runtime/aws-config/src/profile/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ pub enum ProfileFileLoadError {
#[non_exhaustive]
ParseError(ProfileParseError),

/// The profile file (e.g. `~/.aws/config`) encountered an error reading from the filesystem
/// Attempt to read the AWS config file (`~/.aws/config` by default) failed with a filesystem error.
#[non_exhaustive]
CouldNotReadFile(CouldNotReadProfileFile),
}
Expand Down
7 changes: 5 additions & 2 deletions aws/rust-runtime/aws-config/src/provider_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ pub struct ProviderConfig {
connector: HttpConnector,
sleep: Option<Arc<dyn AsyncSleep>>,
region: Option<Region>,
parsed_profile: Arc<OnceCell<Result<ProfileSet, ProfileFileLoadError>>>,
// An AWS profile created from `ProfileFiles` and a `profile_name`
profile: Arc<OnceCell<Result<ProfileSet, ProfileFileLoadError>>>,
// A list of [std::path::Path]s to profile files
profile_files: ProfileFiles,
// An override to use when constructing a `ProfileSet`
profile_name_override: Option<Cow<'static, str>>,
}

Expand Down Expand Up @@ -231,7 +234,7 @@ impl ProviderConfig {
self
}

/// Override profile-file (`~/.aws/config` et al) configuration
/// Override the profile file paths (`~/.aws/config` by default) and name (`default` by default)
pub(crate) fn with_profile_config(
self,
profile_files: Option<ProfileFiles>,
Expand Down

0 comments on commit 5f9829a

Please sign in to comment.