Check server versions on startup & refactor (#48)

* Refactor and check server parameters

* warnings

* fix validator
This commit is contained in:
Lev Kokotov
2022-02-26 11:01:52 -08:00
committed by GitHub
parent 206fdc9769
commit 99d65fc475
4 changed files with 37 additions and 50 deletions

View File

@@ -2,8 +2,6 @@ use bytes::{Buf, BufMut, BytesMut};
use log::trace;
use tokio::net::tcp::OwnedWriteHalf;
use std::collections::HashMap;
use crate::constants::{OID_NUMERIC, OID_TEXT};
use crate::errors::Error;
use crate::messages::write_all_half;
@@ -50,7 +48,7 @@ pub async fn show_stats(stream: &mut OwnedWriteHalf) -> Result<(), Error> {
"avg_wait_time",
];
let stats = get_stats().unwrap_or(HashMap::new());
let stats = get_stats();
let mut res = BytesMut::new();
let mut row_desc = BytesMut::new();
let mut data_row = BytesMut::new();