Skip to content

Commit 311def3

Browse files
chore(deps): bump thiserror from 1.0.67 to 2.0.3 (#314)
* chore(deps): bump thiserror from 1.0.67 to 2.0.3 Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.67 to 2.0.3. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](dtolnay/thiserror@1.0.67...2.0.3) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix clippy errors --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jean Mainguy <9969006+jhandguy@users.noreply.github.com>
1 parent 53940f4 commit 311def3

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

Cargo.lock

Lines changed: 27 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ aws-runtime = "1"
3737
aws-sdk-sts = "1"
3838
aws-smithy-runtime-api = "1"
3939
clap = { version = "4", features = ["derive", "env"] }
40-
thiserror = "1"
40+
thiserror = "2"
4141
time = "0"
4242
tokio = { version = "1", features = ["full"] }
4343

src/env.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const AWS_SESSION_EXPIRATION_TIMESTAMP: &str = "AWS_SESSION_EXPIRATION_TIMESTAMP
1212
pub async fn get_env_credentials(
1313
provider: EnvironmentVariableCredentialsProvider,
1414
) -> Result<Option<Credentials>, Error> {
15-
return match var(AWS_SESSION_EXPIRATION_TIMESTAMP) {
15+
match var(AWS_SESSION_EXPIRATION_TIMESTAMP) {
1616
Ok(var) => match var.parse::<i64>() {
1717
Ok(session_expiration_timestamp) => {
1818
let credentials = provider
@@ -37,5 +37,5 @@ pub async fn get_env_credentials(
3737
var: String::from(AWS_SESSION_EXPIRATION_TIMESTAMP),
3838
source: e,
3939
}),
40-
};
40+
}
4141
}

src/io.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ fn find_credentials(file_content: &str, profile: &str) -> Option<Credentials> {
6363
}
6464

6565
fn replace_credentials(file_content: &str, profile: &str, content: &str) -> String {
66-
return file_content
66+
file_content
6767
.split("\n\n")
6868
.filter(|l| !l.is_empty() && !l.contains(format!("[{profile}]").as_str()))
6969
.collect::<Vec<&str>>()
7070
.join("\n\n")
71-
.add(content);
71+
.add(content)
7272
}
7373

7474
pub fn find_auth_credentials(home: &str, profile: &str) -> Result<Option<Credentials>, Error> {

0 commit comments

Comments
 (0)