Remove unused imports and a couple unused muts

This commit is contained in:
Ryan Leckey
2020-01-02 23:47:15 -08:00
parent 06d6969929
commit 4ced4058ac
9 changed files with 13 additions and 20 deletions

View File

@@ -121,7 +121,7 @@ impl MySqlConnection {
// We must have a separate buffer around the stream as we can't operate directly
// on bytes returned from the stream. We have various kinds of payload manipulation
// that must be handled before decoding.
let mut payload = ret_if_none!(self.stream.peek(self.packet_len).await?);
let payload = ret_if_none!(self.stream.peek(self.packet_len).await?);
self.packet.extend_from_slice(payload);
self.stream.consume(self.packet_len);

View File

@@ -1,6 +1,6 @@
use std::convert::TryFrom;
use byteorder::{BigEndian, ByteOrder, LittleEndian};
use byteorder::{ByteOrder, LittleEndian};
use chrono::{DateTime, Datelike, NaiveDate, NaiveDateTime, NaiveTime, Timelike, Utc};
use crate::decode::{Decode, DecodeError};

View File

@@ -22,7 +22,7 @@ impl Encode<MySql> for i8 {
}
impl Decode<MySql> for i8 {
fn decode(mut buf: &[u8]) -> Result<Self, DecodeError> {
fn decode(buf: &[u8]) -> Result<Self, DecodeError> {
Ok(buf[0] as i8)
}
}