Clippy fixes

This commit is contained in:
Steven Fackler 2019-10-09 15:20:23 -07:00
parent a3f611d609
commit c7055dc665
4 changed files with 6 additions and 5 deletions

View File

@ -144,9 +144,8 @@ impl<'a> DatParser<'a> {
fn eof(&mut self) {
self.skip_ws();
match self.it.next() {
Some((_, ch)) => panic!("expected eof but got {}", ch),
None => {}
if let Some((_, ch)) = self.it.next() {
panic!("expected eof but got {}", ch);
}
}

View File

@ -110,6 +110,7 @@ where
{
type Stream = TlsStream<S>;
type Error = native_tls::Error;
#[allow(clippy::type_complexity)]
type Future = Pin<
Box<dyn Future<Output = Result<(TlsStream<S>, ChannelBinding), native_tls::Error>> + Send>,
>;

View File

@ -132,6 +132,7 @@ where
{
type Stream = SslStream<S>;
type Error = HandshakeError<S>;
#[allow(clippy::type_complexity)]
type Future = Pin<
Box<dyn Future<Output = Result<(SslStream<S>, ChannelBinding), HandshakeError<S>>> + Send>,
>;

View File

@ -133,8 +133,8 @@ where
);
match r {
Ok(()) => Ok(buf),
Err(frontend::BindError::Conversion(e)) => return Err(Error::to_sql(e, error_idx)),
Err(frontend::BindError::Serialization(e)) => return Err(Error::encode(e)),
Err(frontend::BindError::Conversion(e)) => Err(Error::to_sql(e, error_idx)),
Err(frontend::BindError::Serialization(e)) => Err(Error::encode(e)),
}
}