Run rustfmt

This commit is contained in:
Ryan Leckey 2019-11-21 18:19:01 +00:00
parent d6e9c47da8
commit 47867398c2
4 changed files with 10 additions and 11 deletions

View File

@ -1,6 +1,6 @@
use sqlx::postgres::protocol::{Bind, DataRow, RowDescription};
use sqlx::postgres::protocol::{Encode, Decode};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use sqlx::postgres::protocol::{Bind, DataRow, RowDescription};
use sqlx::postgres::protocol::{Decode, Encode};
fn bench(c: &mut Criterion) {
c.bench_function("decode_data_row", |b| {
@ -26,7 +26,8 @@ fn bench(c: &mut Criterion) {
values_len: 2,
values: &[(-1_i8) as _, 0, 0, 0, 1, 0, 0, 0, 25],
result_formats: &[1],
}).encode(&mut buf);
})
.encode(&mut buf);
buf.clear();
});

View File

@ -98,11 +98,9 @@ mod test {
assert_eq!(message.affected_rows, 0);
assert_eq!(message.last_insert_id, 0);
assert!(
message
.server_status
.contains(ServerStatusFlag::SERVER_STATUS_IN_TRANS)
);
assert!(message
.server_status
.contains(ServerStatusFlag::SERVER_STATUS_IN_TRANS));
assert_eq!(message.warning_count, 0);
assert_eq!(message.info, "info".into());

View File

@ -1,6 +1,6 @@
use super::Encode;
use crate::io::BufMut;
use byteorder::{NetworkEndian, ByteOrder};
use byteorder::{ByteOrder, NetworkEndian};
pub struct Bind<'a> {
/// The name of the destination portal (an empty string selects the unnamed portal).

View File

@ -17,9 +17,9 @@ where
DB: Backend,
{
/// Bind a value for use with this SQL query.
///
///
/// # Safety
///
///
/// This function should be used with care, as SQLx cannot validate
/// that the value is of the right type nor can it validate that you have
/// passed the correct number of parameters.