diff --git a/src/asynch.rs b/src/asynch.rs index 835ac87..87026df 100644 --- a/src/asynch.rs +++ b/src/asynch.rs @@ -253,6 +253,7 @@ where self.split_with(ManagedSplitState::new()) } + #[allow(clippy::type_complexity)] // Requires inherent type aliases to solve well. pub fn split_with( self, state: StateContainer, diff --git a/src/blocking.rs b/src/blocking.rs index bf0c9e9..98c4e4c 100644 --- a/src/blocking.rs +++ b/src/blocking.rs @@ -69,10 +69,7 @@ where /// /// Returns an error if the handshake does not proceed. If an error occurs, the connection /// instance must be recreated. - pub fn open<'v, Provider>( - &mut self, - mut context: TlsContext<'v, Provider>, - ) -> Result<(), TlsError> + pub fn open(&mut self, mut context: TlsContext) -> Result<(), TlsError> where Provider: CryptoProvider, { @@ -244,6 +241,7 @@ where self.split_with(ManagedSplitState::new()) } + #[allow(clippy::type_complexity)] // Requires inherent type aliases to solve well. pub fn split_with( self, state: StateContainer, diff --git a/src/connection.rs b/src/connection.rs index eca47c4..75ac09a 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -137,7 +137,7 @@ where certificate_request: Option, } -impl<'v, CipherSuite> Handshake +impl Handshake where CipherSuite: TlsCipherSuite, { @@ -437,10 +437,10 @@ where } } -fn process_server_verify<'a, 'v, Provider>( +fn process_server_verify( handshake: &mut Handshake, key_schedule: &mut KeySchedule, - config: &TlsConfig<'a>, + config: &TlsConfig<'_>, crypto_provider: &mut Provider, record: ServerRecord<'_, Provider::CipherSuite>, ) -> Result diff --git a/src/handshake/certificate.rs b/src/handshake/certificate.rs index e3bd9e0..51844bf 100644 --- a/src/handshake/certificate.rs +++ b/src/handshake/certificate.rs @@ -100,12 +100,12 @@ impl<'a> CertificateEntryRef<'a> { } pub(crate) fn encode(&self, buf: &mut CryptoBuffer<'_>) -> Result<(), TlsError> { - match self { - &CertificateEntryRef::RawPublicKey(_key) => { + match *self { + CertificateEntryRef::RawPublicKey(_key) => { todo!("ASN1_subjectPublicKeyInfo encoding?"); // buf.with_u24_length(|buf| buf.extend_from_slice(key))?; } - &CertificateEntryRef::X509(cert) => { + CertificateEntryRef::X509(cert) => { buf.with_u24_length(|buf| buf.extend_from_slice(cert))?; } } diff --git a/src/record_reader.rs b/src/record_reader.rs index cbd44ca..08e5b97 100644 --- a/src/record_reader.rs +++ b/src/record_reader.rs @@ -72,8 +72,8 @@ impl<'a> RecordReader<'a> { self.consume(header, key_schedule.transcript_hash()) } - fn advance_blocking<'m>( - &'m mut self, + fn advance_blocking( + &mut self, transport: &mut impl BlockingRead, amount: usize, ) -> Result<(), TlsError> { diff --git a/tests/psk_test.rs b/tests/psk_test.rs index d82bd46..fb27e35 100644 --- a/tests/psk_test.rs +++ b/tests/psk_test.rs @@ -54,7 +54,7 @@ fn setup() -> (SocketAddr, JoinHandle<()>) { let mut conn = acceptor.accept(stream).unwrap(); let mut buf = [0; 64]; let len = conn.read(&mut buf[..]).unwrap(); - conn.write(&buf[..len]).unwrap(); + conn.write_all(&buf[..len]).unwrap(); }); (addr, h) } diff --git a/tests/tlsserver.rs b/tests/tlsserver.rs index 46510fb..0423f47 100644 --- a/tests/tlsserver.rs +++ b/tests/tlsserver.rs @@ -240,7 +240,7 @@ impl Connection { // If we have a successful but empty read, that's an EOF. // Otherwise, we shove the data into the TLS session. match maybe_len { - Some(len) if len == 0 => { + Some(0) => { log::debug!("back eof"); self.closing = true; }