Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(bindings): address new clippy lint #4411

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Conversation

jmayclin
Copy link
Contributor

@jmayclin jmayclin commented Feb 8, 2024

With the new rust version, we are seeing the following clippy error.

 error: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
Error:    --> s2n-tls-tokio/src/lib.rs:115:56
    |
115 |                   ready!(self.tls.with_io(ctx, |context| {
    |  ________________________________________________________^
116 | |                     let conn = context.get_mut().as_mut();
117 | |                     conn.poll_negotiate().map(|r| r.map(|_| ()))
118 | |                 }))
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
    = note: `-D clippy::blocks-in-conditions` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::blocks_in_conditions)]`

This PR fixes that clippy error.

Testing:

Existing CI should pass

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Feb 8, 2024
@jmayclin jmayclin marked this pull request as ready for review February 8, 2024 23:58
@jmayclin jmayclin enabled auto-merge (squash) February 9, 2024 00:21
@jmayclin jmayclin merged commit 2178f18 into aws:main Feb 9, 2024
32 checks passed
@jmayclin jmayclin deleted the clippy-fix branch June 15, 2024 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants