Skip to content

Commit

Permalink
fixup: clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ctz committed Sep 12, 2023
1 parent ba26a6d commit 18737c7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ jobs:
- run: cargo clippy --package rustls --no-default-features --all-targets -- --deny warnings
- run: cargo clippy --manifest-path=connect-tests/Cargo.toml --all-features --all-targets -- --deny warnings
- run: cargo clippy --manifest-path=fuzz/Cargo.toml --all-features --all-targets -- --deny warnings
- run: cargo clippy --manifest-path=provider-example/Cargo.toml --all-features --all-targets -- --deny warnings

clippy-nightly:
name: Clippy (Nightly)
Expand All @@ -304,3 +305,4 @@ jobs:
- run: cargo clippy --package rustls --no-default-features --all-targets
- run: cargo clippy --manifest-path=connect-tests/Cargo.toml --all-features --all-targets
- run: cargo clippy --manifest-path=fuzz/Cargo.toml --all-features --all-targets
- run: cargo clippy --manifest-path=provider-example/Cargo.toml --all-features --all-targets
8 changes: 4 additions & 4 deletions provider-example/src/aead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ impl cipher::MessageEncrypter for Tls13Cipher {
self.0
.encrypt_in_place(&nonce, &aad, &mut payload)
.map_err(|_| rustls::Error::EncryptError)
.and_then(|_| {
Ok(cipher::OpaqueMessage::new(
.map(|_| {
cipher::OpaqueMessage::new(
ContentType::ApplicationData,
ProtocolVersion::TLSv1_2,
payload,
))
)
})
}
}
Expand Down Expand Up @@ -121,7 +121,7 @@ impl cipher::MessageEncrypter for Tls12Cipher {
self.0
.encrypt_in_place(&nonce, &aad, &mut payload)
.map_err(|_| rustls::Error::EncryptError)
.and_then(|_| Ok(cipher::OpaqueMessage::new(m.typ, m.version, payload)))
.map(|_| cipher::OpaqueMessage::new(m.typ, m.version, payload))
}
}

Expand Down
2 changes: 1 addition & 1 deletion provider-example/src/kx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl crypto::KeyExchange for KeyExchange {
}

fn all_kx_groups() -> &'static [&'static Self::SupportedGroup] {
&ALL_KX_GROUPS
ALL_KX_GROUPS
}
}

Expand Down
2 changes: 1 addition & 1 deletion provider-example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl rustls::crypto::CryptoProvider for Provider {
}

fn default_cipher_suites() -> &'static [rustls::SupportedCipherSuite] {
&ALL_CIPHER_SUITES
ALL_CIPHER_SUITES
}
}

Expand Down

0 comments on commit 18737c7

Please sign in to comment.