Skip to content

Commit 6cc3ed7

Browse files
devenlandonxjames
andauthored
Fix trivial mistake in error message. (#3952)
## Motivation and Context This commit fixes a bad error message. ## Description In `read_profile_line()`, when `.strip_prefix('[')` fails, the original error message was `Profile definition must start with ]`, which is obviously wrong. This commit fixes the error message to be `Profile definition must start with '['`, which corrects the mistake in the original error message (fixing `]` to be `[`), and adds the single quotes to match the formatting of the error message used when `.strip_suffix(']')` fails (`Profile definition must end with ']'`). ## Testing No testing is needed here; this is solely a change to a hardcoded error message string. ## Checklist This is a trivial fix. Is it really interesting enough to mention in a changelog? - [ ] For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "client," "server," or both in the `applies_to` key. - [ ] For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "aws-sdk-rust" in the `applies_to` key. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Landon James <lnj@amazon.com>
1 parent 916cfb6 commit 6cc3ed7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

aws/rust-runtime/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aws/rust-runtime/aws-runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aws-runtime"
3-
version = "1.5.2"
3+
version = "1.5.3"
44
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>"]
55
description = "Runtime support code for the AWS SDK. This crate isn't intended to be used directly."
66
edition = "2021"

aws/rust-runtime/aws-runtime/src/env_config/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl<'a> Parser<'a> {
204204
let line = prepare_line(line, false);
205205
let profile_name = line
206206
.strip_prefix('[')
207-
.ok_or_else(|| self.make_error("Profile definition must start with ]"))?
207+
.ok_or_else(|| self.make_error("Profile definition must start with '['"))?
208208
.strip_suffix(']')
209209
.ok_or_else(|| self.make_error("Profile definition must end with ']'"))?;
210210
if !self.data.contains_key(profile_name) {

0 commit comments

Comments
 (0)