Switch to parking_lot RwLock & Mutex. Use trace! for protocol instead of debug! (#42)

* RwLock & parking_lot::Mutex

* upgrade to trace
This commit is contained in:
Lev Kokotov
2022-02-24 08:44:41 -08:00
committed by GitHub
parent b3c8ca4b8a
commit 5972b6fa52
7 changed files with 48 additions and 41 deletions

View File

@@ -38,7 +38,7 @@ pub async fn backend_key_data(
Ok(write_all(stream, key_data).await?)
}
#[allow(dead_code)]
/// Construct a `Q`: Query message.
pub fn simple_query(query: &str) -> BytesMut {
let mut res = BytesMut::from(&b"Q"[..]);
let query = format!("{}\0", query);