style: rustfmt

This commit is contained in:
Ryan Leckey 2021-01-01 12:35:47 -08:00
parent 55a8e7ba29
commit ac408e9a56
No known key found for this signature in database
GPG Key ID: F8AA68C235AB08C9
6 changed files with 15 additions and 10 deletions

View File

@ -1,2 +1,5 @@
use_small_heuristics = "Max"
group_imports = "StdExternalCrate"
edition = "2018"
unstable_features = true
version = "Two"

View File

@ -1,11 +1,11 @@
mod buf;
mod write;
mod buf_stream;
mod deserialize;
mod serialize;
mod write;
pub use buf::BufExt;
pub use write::WriteExt;
pub use buf_stream::BufStream;
pub use deserialize::Deserialize;
pub use serialize::Serialize;
pub use write::WriteExt;

View File

@ -1,6 +1,6 @@
use std::io;
use bytes::{Bytes, Buf};
use bytes::{Buf, Bytes};
use memchr::memchr;
use string::String;
@ -33,7 +33,9 @@ impl BufExt for Bytes {
#[cfg(test)]
mod tests {
use std::io;
use bytes::{Bytes, Buf};
use bytes::{Buf, Bytes};
use super::BufExt;
#[test]

View File

@ -1,5 +1,5 @@
mod write;
mod buf;
mod write;
pub(crate) use write::MySqlWriteExt;
pub(crate) use buf::MySqlBufExt;
pub(crate) use write::MySqlWriteExt;

View File

@ -1,6 +1,6 @@
use bytes::{Bytes, Buf};
use string::String;
use bytes::{Buf, Bytes};
use sqlx_core::io::BufExt;
use string::String;
// UNSAFE: _unchecked string methods
// intended for use when the protocol is *known* to always produce
@ -30,7 +30,7 @@ impl MySqlBufExt for Bytes {
// NOTE: 0xFF may be the first byte of an ERR packet
0xff => unreachable!("unexpected 0xFF (undefined) in `get_uint_lenenc`"),
value => u64::from(value)
value => u64::from(value),
}
}

View File

@ -2,8 +2,8 @@ use bytes::BufMut;
use sqlx_core::io::{Serialize, WriteExt};
use sqlx_core::Result;
use crate::protocol::Capabilities;
use crate::io::MySqlWriteExt;
use crate::protocol::Capabilities;
// https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse
// https://mariadb.com/kb/en/connection/#client-handshake-response