diff --git a/benches/postgres_protocol.rs b/benches/postgres_protocol.rs index 4d93aac0..2b1f0e6c 100644 --- a/benches/postgres_protocol.rs +++ b/benches/postgres_protocol.rs @@ -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(); }); diff --git a/src/mariadb/protocol/response/ok.rs b/src/mariadb/protocol/response/ok.rs index 302a7c8d..ff0be09a 100644 --- a/src/mariadb/protocol/response/ok.rs +++ b/src/mariadb/protocol/response/ok.rs @@ -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()); diff --git a/src/postgres/protocol/bind.rs b/src/postgres/protocol/bind.rs index 1bf9dd12..b48ad9c8 100644 --- a/src/postgres/protocol/bind.rs +++ b/src/postgres/protocol/bind.rs @@ -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). diff --git a/src/sql.rs b/src/sql.rs index 3b37ffc0..756c5394 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -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.