diff options
author | maflcko <6399679+maflcko@users.noreply.github.com> | 2024-01-09 13:47:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-09 13:47:28 +0100 |
commit | 09581dab987b7917b3043f59d5c75fa61ce975c5 (patch) | |
tree | 9dddacca8bbd5ac13cfd67a46d68ef476f740a9a /src | |
parent | e61d669bb80efbf602f80f19a2bbad646e811ae8 (diff) |
cargo clippy --tests --examples --fix (#496)
Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
Diffstat (limited to 'src')
-rw-r--r-- | src/auth.rs | 2 | ||||
-rw-r--r-- | src/models/events/payload/push.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/auth.rs b/src/auth.rs index efb8270..4f276b8 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -123,7 +123,7 @@ impl From<OAuthWire> for OAuth { token_type: value.token_type, scope: value.scope.split(',').map(ToString::to_string).collect(), expires_in: value.expires_in, - refresh_token: value.refresh_token.map(|t| SecretString::from(t)), + refresh_token: value.refresh_token.map(SecretString::from), refresh_token_expires_in: value.refresh_token_expires_in, } } diff --git a/src/models/events/payload/push.rs b/src/models/events/payload/push.rs index afe602a..cc29634 100644 --- a/src/models/events/payload/push.rs +++ b/src/models/events/payload/push.rs @@ -39,7 +39,7 @@ mod test { assert_eq!(payload.head, "eb1a60c03544dcea290f2d57bb66ae188ce25778"); assert_eq!(payload.before, "9b2afb3a8e03fb30cc09e5efb64823bde802cf59"); assert_eq!(payload.commits.len(), 1); - let commit = payload.commits.get(0).unwrap(); + let commit = payload.commits.first().unwrap(); assert_eq!(commit.sha, "eb1a60c03544dcea290f2d57bb66ae188ce25778"); assert_eq!( commit.author, |