Remove more unused imports

This commit is contained in:
Ryan Leckey 2020-01-02 23:49:42 -08:00
parent 4ced4058ac
commit ed8cb40245
3 changed files with 6 additions and 9 deletions

View file

@ -5,11 +5,9 @@ use async_std::net::{Shutdown, TcpStream};
use byteorder::{ByteOrder, LittleEndian};
use futures_core::future::BoxFuture;
use sha1::Sha1;
use sha2::{Digest, Sha256};
use crate::cache::StatementCache;
use crate::connection::Connection;
use crate::executor::Executor;
use crate::io::{Buf, BufMut, BufStream};
use crate::mysql::error::MySqlError;
use crate::mysql::protocol::{
@ -306,7 +304,7 @@ impl MySqlConnection {
self.send(&[public_key_request_id][..]).await?;
// server sends a public key response
let mut packet = self.receive().await?.packet();
let packet = self.receive().await?.packet();
let rsa_pub_key = &packet[1..];
// The password string data must be NUL terminated

View file

@ -6,10 +6,9 @@ use futures_core::stream::BoxStream;
use crate::describe::{Column, Describe};
use crate::executor::Executor;
use crate::mysql::error::MySqlError;
use crate::mysql::protocol::{
Capabilities, ColumnCount, ColumnDefinition, ComQuery, ComStmtExecute, ComStmtPrepare,
ComStmtPrepareOk, Cursor, Decode, EofPacket, ErrPacket, OkPacket, Row, Type,
ComStmtPrepareOk, Cursor, Decode, EofPacket, OkPacket, Row, Type,
};
use crate::mysql::{MySql, MySqlArguments, MySqlConnection, MySqlRow};
@ -148,7 +147,7 @@ impl MySqlConnection {
async fn step(&mut self, columns: &[Type], binary: bool) -> crate::Result<Option<Step>> {
let capabilities = self.capabilities;
let packet = ret_if_none!(self.try_receive().await?);
ret_if_none!(self.try_receive().await?);
match self.packet[0] {
0xfe if self.packet.len() < 0xffffff => {

View file

@ -1,4 +1,4 @@
use digest::{Digest, DynDigest};
use digest::Digest;
use num_bigint::BigUint;
use rand::{thread_rng, Rng};
@ -125,8 +125,8 @@ fn oaep_encrypt<R: Rng, D: Digest>(
oeap_mgf1_xor(seed, &mut digest, db);
{
let mut m = BigUint::from_bytes_be(&em);
let mut c = internals_encrypt(pub_key, &m).to_bytes_be();
let m = BigUint::from_bytes_be(&em);
let c = internals_encrypt(pub_key, &m).to_bytes_be();
internals_copy_with_left_pad(&mut em, &c);
}