From 1b0a1198b4b3b7cd4fd6392df27772c5893df607 Mon Sep 17 00:00:00 2001 From: Eugene Date: Fri, 10 May 2024 21:07:38 +0200 Subject: [PATCH] lints --- russh/src/kex/ecdh_nistp.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/russh/src/kex/ecdh_nistp.rs b/russh/src/kex/ecdh_nistp.rs index c222a3a3..0fd0ff66 100644 --- a/russh/src/kex/ecdh_nistp.rs +++ b/russh/src/kex/ecdh_nistp.rs @@ -89,6 +89,7 @@ where return Err(crate::Error::Inconsistent); } + #[allow(clippy::indexing_slicing)] // length checked elliptic_curve::PublicKey::::from_sec1_bytes(&payload[5..(5 + pubkey_len)]) .map_err(|_| crate::Error::Inconsistent)? }; @@ -154,7 +155,7 @@ where buffer.extend_ssh_string(&exchange.server_ephemeral); if let Some(ref shared) = self.shared_secret { - buffer.extend_ssh_mpint(&shared.raw_secret_bytes()); + buffer.extend_ssh_mpint(shared.raw_secret_bytes()); } use sha2::Digest;