Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
franziskuskiefer committed Jan 10, 2024
1 parent 66b5e5e commit 58f03b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tls13crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ fn encoding_prefix(alg: KemScheme) -> Bytes {
/// concatenation of bytes. We have to work with uncompressed NIST points here.
fn into_raw(alg: KemScheme, point: Bytes) -> Bytes {
if alg == KemScheme::Secp256r1 || alg == KemScheme::Secp384r1 || alg == KemScheme::Secp521r1 {
point.slice_range(1..point.len()).into()
point.slice_range(1..point.len())
} else {
point
}
Expand Down Expand Up @@ -556,7 +556,7 @@ pub(crate) fn kem_encap(
/// We only want the X coordinate for points on NIST curves.
fn to_shared_secret(alg: KemScheme, shared_secret: Bytes) -> Bytes {
if alg == KemScheme::Secp256r1 {
shared_secret.slice_range(0..32).into()
shared_secret.slice_range(0..32)
} else if alg == KemScheme::Secp384r1 || alg == KemScheme::Secp521r1 {
unimplemented!("not supported yet");
} else {
Expand Down

0 comments on commit 58f03b9

Please sign in to comment.