new client api from ref-method branch

This commit is contained in:
Mitchell 2020-08-19 22:24:10 +01:00
parent 135a497f18
commit 573a625a04
1 changed files with 1 additions and 2 deletions

View File

@ -6,7 +6,6 @@ use crate::{
use std::time::Duration;
use zeroize::Zeroize;
pub struct ClientApi {
socket: TcpStream,
addr: String,
@ -45,7 +44,7 @@ impl ClientApi {
let _ = stream.read(&mut buffer)?;
println!("data recieved: {:?}", &buffer[0..20]);
match Commands::from(&buffer) {
match Commands::from(&mut buffer) {
Commands::Request(None) => {
println!("zeroing");
buffer.zeroize();