Minor clean up

This commit is contained in:
Ryan Leckey
2019-06-28 21:36:46 -07:00
parent b81eda3673
commit aa0b27af35
12 changed files with 64 additions and 24 deletions

View File

@@ -3,7 +3,7 @@ extern crate criterion;
use bytes::Bytes;
use criterion::{black_box, Criterion};
use sqlx_postgres_protocol::{Decode, ParameterStatus, BackendKeyData, Response};
use sqlx_postgres_protocol::{BackendKeyData, Decode, ParameterStatus, Response};
fn criterion_benchmark(c: &mut Criterion) {
const NOTICE_RESPONSE: &[u8] = b"SNOTICE\0VNOTICE\0C42710\0Mextension \"uuid-ossp\" already exists, skipping\0Fextension.c\0L1656\0RCreateExtension\0\0";
@@ -18,7 +18,8 @@ fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("decode BackendKeyData", |b| {
b.iter(|| {
let _ = BackendKeyData::decode(black_box(Bytes::from_static(BACKEND_KEY_DATA))).unwrap();
let _ =
BackendKeyData::decode(black_box(Bytes::from_static(BACKEND_KEY_DATA))).unwrap();
})
});