mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-01-06 08:42:06 +00:00
Run rustfmt
This commit is contained in:
parent
d6e9c47da8
commit
47867398c2
@ -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();
|
||||
});
|
||||
|
||||
@ -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());
|
||||
|
||||
|
||||
@ -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).
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user